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 2023/07/11 09:47:21 UTC
[jackrabbit-filevault] 02/02: fix coverage calculation
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/fix-sonarcloud
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
commit eb0db3f2d41163212e3a0286196d1a5ed3a90998
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Jul 11 11:47:11 2023 +0200
fix coverage calculation
minor cleanup
---
.ratignore | 1 +
parent/pom.xml | 2 +-
pom.xml | 9 ++++++++-
vault-core-it/vault-core-it-execution/pom.xml | 2 +-
vault-core/pom.xml | 21 ---------------------
vault-coverage-aggregate/pom.xml | 18 +++++++++++++++++-
vault-hook-example/pom.xml | 4 ++++
vault-hook-externalclass-test/pom.xml | 4 ++++
8 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/.ratignore b/.ratignore
new file mode 100644
index 00000000..d9975951
--- /dev/null
+++ b/.ratignore
@@ -0,0 +1 @@
+vault-coverage-aggregate/**
\ No newline at end of file
diff --git a/parent/pom.xml b/parent/pom.xml
index 7a47e873..062e46ce 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -62,7 +62,7 @@ Apache Jackrabbit FileVault is a project of the Apache Software Foundation.
<minimalMavenBuildVersion>3.6.1</minimalMavenBuildVersion><!-- due to https://issues.apache.org/jira/browse/MNG-6059 -->
<minimalJavaBuildVersion>11</minimalJavaBuildVersion>
<maven.compiler.release>8</maven.compiler.release>
- <surefire.version>3.0.0-M7</surefire.version>
+ <surefire.version>3.1.2</surefire.version>
<sling.url>http://localhost:4502</sling.url>
<jacoco.command /><!-- is overwritten by https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
<project.build.outputTimestamp>2023-01-05T15:25:16Z</project.build.outputTimestamp>
diff --git a/pom.xml b/pom.xml
index a8e8c79a..5073ec69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
<properties>
<project.build.outputTimestamp>2023-01-05T15:25:16Z</project.build.outputTimestamp>
- <!-- add some coverage excludes -->
+ <!-- https://docs.sonarcloud.io/enriching/test-coverage/test-coverage-parameters/#javakotlinscalajvm -->
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/vault-coverage-aggregate/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>
@@ -98,6 +98,13 @@
<verbose>false</verbose>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludesFile>${project.basedir}/.ratignore</excludesFile>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
diff --git a/vault-core-it/vault-core-it-execution/pom.xml b/vault-core-it/vault-core-it-execution/pom.xml
index df8260c8..ddc87663 100644
--- a/vault-core-it/vault-core-it-execution/pom.xml
+++ b/vault-core-it/vault-core-it-execution/pom.xml
@@ -104,7 +104,7 @@
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
- <excludes>
+ <excludes combine.children="append">
<exclude>vault-core-it-execution-oak-min/**</exclude>
</excludes>
</configuration>
diff --git a/vault-core/pom.xml b/vault-core/pom.xml
index 1af03322..7652f4af 100644
--- a/vault-core/pom.xml
+++ b/vault-core/pom.xml
@@ -45,21 +45,6 @@
<build>
<pluginManagement>
<plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>report-merged</id>
- <configuration>
- <!-- https://github.com/jacoco/jacoco/issues/34 -->
- <includes>
- <include>org/apache/jackrabbit/vault/**</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
@@ -121,12 +106,6 @@
</archive>
</configuration>
</execution>
- <execution>
- <id>default-test-jar</id>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
</executions>
</plugin>
<plugin>
diff --git a/vault-coverage-aggregate/pom.xml b/vault-coverage-aggregate/pom.xml
index 21a49564..3865710e 100644
--- a/vault-coverage-aggregate/pom.xml
+++ b/vault-coverage-aggregate/pom.xml
@@ -37,51 +37,61 @@
<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>vault-rcp</artifactId>
+ <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>
@@ -98,6 +108,12 @@
<goals>
<goal>report-aggregate</goal>
</goals>
+ <configuration>
+ <includes>
+ <!-- shaded 3rd party classes -->
+ <include>org/apache/jackrabbit/vault/**</include>
+ </includes>
+ </configuration>
</execution>
</executions>
</plugin>
diff --git a/vault-hook-example/pom.xml b/vault-hook-example/pom.xml
index 88cf9863..f872b2fe 100644
--- a/vault-hook-example/pom.xml
+++ b/vault-hook-example/pom.xml
@@ -38,6 +38,10 @@
Provides an example of a package install hook
</description>
+ <properties>
+ <!-- skip from Sonarcloud analysis -->
+ <sonar.skip>true</sonar.skip>
+ </properties>
<!-- ====================================================================== -->
<!-- B U I L D D E F I N I T I O N -->
diff --git a/vault-hook-externalclass-test/pom.xml b/vault-hook-externalclass-test/pom.xml
index 6406f25f..613cc977 100644
--- a/vault-hook-externalclass-test/pom.xml
+++ b/vault-hook-externalclass-test/pom.xml
@@ -38,6 +38,10 @@
Provides an example of a package install hook that uses a class not available in bundles classpath
</description>
+ <properties>
+ <!-- skip from Sonarcloud analysis -->
+ <sonar.skip>true</sonar.skip>
+ </properties>
<!-- ====================================================================== -->
<!-- B U I L D D E F I N I T I O N -->
<!-- ====================================================================== -->