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/21 15:36:28 UTC
(jackrabbit) branch trunk updated: JCR-5173 Create aggregated coverage report
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 bb95e7b1e JCR-5173 Create aggregated coverage report
bb95e7b1e is described below
commit bb95e7b1e47e67e42542beaa3655ccf1f812cccd
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Jul 21 12:17:58 2025 +0200
JCR-5173 Create aggregated coverage report
JCR-5172 Exclude jackrabbit-jcr-tests from coverage calculation
---
jackrabbit-parent/pom.xml | 33 +++++++++++++++++++++++++++++++++
pom.xml | 17 +++++++++++++++++
2 files changed, 50 insertions(+)
diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml
index 5173333c5..9912adeaf 100644
--- a/jackrabbit-parent/pom.xml
+++ b/jackrabbit-parent/pom.xml
@@ -185,6 +185,39 @@
<properties>
<skip.coverage>false</skip.coverage>
</properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!-- generates aggregate (cross-module) coverage reports, https://github.com/olamy/jacoco-aggregator-maven-plugin
+ only enable this plugin (without inheritance) in the root module, as this is an aggregator plugin
+ -->
+ <plugin>
+ <groupId>io.github.olamy.maven.plugins</groupId>
+ <artifactId>jacoco-aggregator-maven-plugin</artifactId>
+ <version>1.0.3</version>
+ <configuration>
+ <includes>
+ <!-- exclude shaded 3rd party classes -->
+ <include>org/apache/jackrabbit/**</include>
+ </includes>
+ <excludes>
+ <!-- exclude classes in jackrabbit-jcr-tests -->
+ <exclude>org/apache/jackrabbit/test/**</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>aggregate</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>report-aggregate-all</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</profile>
</profiles>
diff --git a/pom.xml b/pom.xml
index b5264e64f..375583509 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,6 +35,11 @@
<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>
@@ -87,6 +92,18 @@
</build>
<profiles>
+ <profile>
+ <id>coverage</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.github.olamy.maven.plugins</groupId>
+ <artifactId>jacoco-aggregator-maven-plugin</artifactId>
+ <inherited>false</inherited><!-- only execute on root level (as aggregator)-->
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>apache-release</id>
<properties>