You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2026/02/10 07:28:33 UTC

(jackrabbit) branch trunk updated: JCR-5173: Fix sonar.coverage.jacoco.xmlReportPaths for modules

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5213d444e JCR-5173: Fix sonar.coverage.jacoco.xmlReportPaths for modules
5213d444e is described below

commit 5213d444e1b67f36faa362b6323541d0a561415f
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Feb 9 19:49:13 2026 +0100

    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.
---
 .mvn/README.md            | 1 +
 jackrabbit-parent/pom.xml | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.mvn/README.md b/.mvn/README.md
new file mode 100644
index 000000000..560e6560e
--- /dev/null
+++ b/.mvn/README.md
@@ -0,0 +1 @@
+Used for determining [`maven.multiModuleProjectDirectory`](https://issues.apache.org/jira/browse/MNG-5786).
\ No newline at end of file
diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml
index 12450b070..a3eabe8a9 100644
--- a/jackrabbit-parent/pom.xml
+++ b/jackrabbit-parent/pom.xml
@@ -80,7 +80,8 @@
     <minimalMavenBuildVersion>3.6.1</minimalMavenBuildVersion><!-- due to https://issues.apache.org/jira/browse/MNG-6059 -->
     
     <!-- 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 -->
-    <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+    <!-- "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-->
+    <sonar.coverage.jacoco.xmlReportPaths>${maven.multiModuleProjectDirectory}/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
     <!-- this should be the same as the exclusions for jacoco, compare with https://groups.google.com/g/sonarqube/c/VwEE_ZD2KzI -->
     <sonar.coverage.exclusions>**/org/apache/jackrabbit/test/**</sonar.coverage.exclusions>
     <!-- exclude test code from analysis-->