Skip to content

Commit ec8379c

Browse files
committed
JCR-5173: Fix sonar.coverage.jacoco.xmlReportPaths for modules
All modules must refer to the single aggregate report to extract coverage information only from there.
1 parent c3ba3a6 commit ec8379c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

jackrabbit-parent/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
<minimalMavenBuildVersion>3.6.1</minimalMavenBuildVersion><!-- due to https://issues.apache.org/jira/browse/MNG-6059 -->
8181

8282
<!-- this project uses cross-module reports with one aggregate, https://docs.sonarsource.com/sonarcloud/enriching/test-coverage/java-test-coverage/#add-coverage-in-a-multi-module-maven-project -->
83-
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
83+
<!-- "maven.multiModuleProjectDirectory" is undocumented (https://issues.apache.org/jira/browse/MNG-6589) but the only way to reference the aggregate root directory in Maven 3.x-->
84+
<sonar.coverage.jacoco.xmlReportPaths>${maven.multiModuleProjectDirectory}/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
8485
<!-- this should be the same as the exclusions for jacoco, compare with https://groups.google.com/g/sonarqube/c/VwEE_ZD2KzI -->
8586
<sonar.coverage.exclusions>**/org/apache/jackrabbit/test/**</sonar.coverage.exclusions>
8687
<!-- exclude test code from analysis-->

0 commit comments

Comments
 (0)