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/16 14:58:58 UTC

(jackrabbit) 01/01: JCR-5160 Generate Jacoco Report in default location to be picked up by SonarScanner for Maven

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

kwin pushed a commit to branch bugfix/fix-jacoco-coverage
in repository https://gitbox.apache.org/repos/asf/jackrabbit.git

commit 2742cbb10d52ece5f48563c805d4dea31f04b051
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Jul 16 16:58:50 2025 +0200

    JCR-5160 Generate Jacoco Report in default location to be picked up by
    SonarScanner for Maven
    
    The same agent is used for both ITs/UTs, one aggregate report is being
    used.
---
 jackrabbit-parent/pom.xml | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml
index 3956e25de..5a5d35e05 100644
--- a/jackrabbit-parent/pom.xml
+++ b/jackrabbit-parent/pom.xml
@@ -263,26 +263,25 @@
         <version>0.8.13</version>
         <executions>
           <execution>
-            <id>pre-unit-test</id>
+            <id>prepare-jacoco-agent</id>
             <goals>
               <goal>prepare-agent</goal>
             </goals>
             <configuration>
+              <!-- the same agent is used for both ITs/UTs -->
               <skip>${skip.coverage}</skip>
-              <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
               <propertyName>test.opts.coverage</propertyName>
+              <!-- this is default, but make it more explicit, i.e. ITs just extend the existing execution data file-->
+              <append>true</append>
             </configuration>
           </execution>
           <execution>
-            <id>post-unit-test</id>
-            <phase>test</phase>
+            <id>generate-jacoco-report</id>
             <goals>
               <goal>report</goal>
             </goals>
             <configuration>
               <skip>${skip.coverage}</skip>
-              <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
-              <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
             </configuration>
           </execution>
           <execution>
@@ -291,7 +290,6 @@
               <goal>check</goal>
             </goals>
             <configuration>
-              <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
               <rules>
                 <rule>
                   <element>BUNDLE</element>