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 2025/07/24 12:29:21 UTC

(jackrabbit) branch trunk updated: JCR-5174 Exclude jackrabbit-jcr-tests from coverage calculation

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 65fd0fa2e JCR-5174 Exclude jackrabbit-jcr-tests from coverage calculation
65fd0fa2e is described below

commit 65fd0fa2ec9a5ffeac56e2b1b931a0a263f0a9f5
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Jul 21 19:29:36 2025 +0200

    JCR-5174 Exclude jackrabbit-jcr-tests from coverage calculation
    
    JCR-5172 Exclude test sources from SonarQube analysis
---
 jackrabbit-parent/pom.xml | 8 ++++++++
 pom.xml                   | 5 -----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml
index 9912adeaf..7e576698c 100644
--- a/jackrabbit-parent/pom.xml
+++ b/jackrabbit-parent/pom.xml
@@ -78,8 +78,16 @@
     <!-- see https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
     <project.build.outputTimestamp>1752168029</project.build.outputTimestamp>
     <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>
+    <!-- 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-->
+    <sonar.test.exclusions>src/test/**</sonar.test.exclusions>
   </properties>
 
+
   <url>http://jackrabbit.apache.org/</url>
   <inceptionYear>2004</inceptionYear>
   <description>
diff --git a/pom.xml b/pom.xml
index 375583509..515dc8542 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,11 +35,6 @@
   <name>Apache Jackrabbit</name>
   <packaging>pom</packaging>
 
-  <properties>
-    <!-- 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>
-  </properties>
-
   <modules>
     <module>jackrabbit-parent</module>
     <module>jackrabbit-jcr-commons</module>