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/17 12:41:19 UTC

(jackrabbit-filevault) branch feature/jacoco-aggregator-plugin updated (a6c1d120 -> 0993f06d)

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

kwin pushed a change to branch feature/jacoco-aggregator-plugin
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git


 discard a6c1d120 JCRVLT-808 Use dedicated jacoco-aggregator-m-p to calculate cross module coverage
     new 0993f06d JCRVLT-808 Use dedicated jacoco-aggregator-m-p to calculate cross module coverage

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a6c1d120)
            \
             N -- N -- N   refs/heads/feature/jacoco-aggregator-plugin (0993f06d)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 parent/pom.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)


(jackrabbit-filevault) 01/01: JCRVLT-808 Use dedicated jacoco-aggregator-m-p to calculate cross module coverage

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/jacoco-aggregator-plugin
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git

commit 0993f06d8331de0c5bfd850e69fb9906cbb98d25
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Jul 17 14:20:32 2025 +0200

    JCRVLT-808 Use dedicated jacoco-aggregator-m-p to calculate cross module
    coverage
    
    Get rid of manually maintained vault-coverage-aggregate-module
---
 Jenkinsfile                      |   2 +-
 parent/pom.xml                   |  22 +++++++
 pom.xml                          |   8 +--
 vault-coverage-aggregate/pom.xml | 126 ---------------------------------------
 4 files changed, 24 insertions(+), 134 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 8cec718a..a283be3f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -25,7 +25,7 @@ vaultPipeline('ubuntu', 11, '3', {
   vaultStageBuild(['Windows'], [17,21], [], 'apache_jackrabbit-filevault', 
      [
        simpleCredentialsMap: ['NIST_NVD_API_KEY': 'NIST_NVD_API_KEY'],
-       mainBuildArguments: '-U clean site deploy -Pjacoco-report,dependency-check -Dlogback.configurationFile=vault-core/src/test/resources/logback-only-errors.xml -DnvdApiKeyEnvironmentVariable=NIST_NVD_API_KEY'
+       mainBuildArguments: '-U clean site deploy jacoco-aggregator:report-aggregate-all -Pjacoco-report,dependency-check -Dlogback.configurationFile=vault-core/src/test/resources/logback-only-errors.xml -DnvdApiKeyEnvironmentVariable=NIST_NVD_API_KEY'
      ]
   )
   vaultStageDeploy()
diff --git a/parent/pom.xml b/parent/pom.xml
index f5e2b6b7..12d811d5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -620,6 +620,27 @@ Bundle-Category: jackrabbit
                                 <argLine>@{jacoco.command} -Djacoco.command=@{jacoco.command}</argLine>
                             </configuration>
                         </plugin>
+                        <!-- generates aggregate (cross-module) coverage reports, https://github.com/olamy/jacoco-aggregator-maven-plugin
+                            needs to be called as dedicated goal via CLI due to being an aggregator plugin (https://cwiki.apache.org/confluence/display/MAVENOLD/Aggregator+Plugins)
+                         -->
+                        <plugin>
+                            <groupId>io.github.olamy.maven.plugins</groupId>
+                            <artifactId>jacoco-aggregator-maven-plugin</artifactId>
+                            <version>1.0.2</version>
+                            <configuration>
+                                <includes>
+                                    <!-- exclude shaded 3rd party classes -->
+                                    <include>org/apache/jackrabbit/vault/**</include>
+                                </includes>
+                                <excludes>
+                                    <!-- exclude ITs -->
+                                    <exclude>org/apache/jackrabbit/vault/**/*IT.class</exclude>
+                                    <exclude>org/apache/jackrabbit/vault/**/IT*.class</exclude>
+                                    <exclude>org/apache/jackrabbit/vault/it/**</exclude>
+                                    <exclude>org/apache/jackrabbit/vault/iintegration/support/**</exclude>
+                                </excludes>
+                            </configuration>
+                        </plugin>
                     </plugins>
                 </pluginManagement>
                 <plugins>
@@ -668,6 +689,7 @@ Bundle-Category: jackrabbit
                                     </fileSets>
                                 </configuration>
                             </execution>
+                            <!-- this report is not used for SonarQube, but just the aggregate one. This is just for local development purposes -->
                             <execution>
                                 <id>report-merged</id>
                                 <phase>verify</phase>
diff --git a/pom.xml b/pom.xml
index 1b6ca987..d40f96ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,7 @@
     <properties>
         <project.build.outputTimestamp>2025-03-25T09:33:00Z</project.build.outputTimestamp>
         <!-- 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}/vault-coverage-aggregate/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
     </properties>
 
     <distributionManagement>
@@ -355,11 +355,5 @@ file://${basedir}/target/vote.txt
                 </plugins>
             </build>
         </profile>
-        <profile>
-            <id>jacoco-report</id>
-            <modules>
-                <module>vault-coverage-aggregate</module>
-            </modules>
-        </profile>
     </profiles>
 </project>
diff --git a/vault-coverage-aggregate/pom.xml b/vault-coverage-aggregate/pom.xml
deleted file mode 100644
index 9c8085e1..00000000
--- a/vault-coverage-aggregate/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0"?><!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements. See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License. You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
-    child.project.url.inherit.append.path="false">
-    <modelVersion>4.0.0</modelVersion>
-    <!-- ====================================================================== -->
-    <!-- P A R E N T  P R O J E C T  D E S C R I P T I O N                      -->
-    <!-- ====================================================================== -->
-    <parent>
-        <groupId>org.apache.jackrabbit.vault</groupId>
-        <artifactId>parent</artifactId>
-        <relativePath>../parent/pom.xml</relativePath>
-        <version>${revision}</version>
-    </parent>
-    <artifactId>vault-coverage-aggregate</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Jackrabbit FileVault Aggregate Coverage Report </name>
-    <description>Jacoco Aggregate Coverage Report to be used with SonarCloud.io</description>
-    <dependencies>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>org.apache.jackrabbit.vault</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-core-it-execution-jr2-min</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-core-it-execution-oak-min</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-core-it-execution-oak-max</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-davex</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-diff</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>org.apache.jackrabbit.vault.rcp</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-sync</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-validation</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>vault-vlt</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <!--
-            https://docs.sonarcloud.io/enriching/test-coverage/java-test-coverage/#add-coverage-in-a-multi-module-maven-project -->
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>report-aggregate</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>report-aggregate</goal>
-                        </goals>
-                        <configuration>
-                            <includes>
-                                <!-- shaded 3rd party classes -->
-                                <include>org/apache/jackrabbit/vault/**</include>
-                            </includes>
-                            <!-- only consider merged data files (consisting of both IT and UT) -->
-                            <dataFileIncludes>
-                               <dataFileInclude>**/jacoco.exec</dataFileInclude> 
-                            </dataFileIncludes>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file