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:19 UTC
[jackrabbit-filevault] branch feature/fix-sonarcloud created (now eb0db3f2)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a change to branch feature/fix-sonarcloud
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
at eb0db3f2 fix coverage calculation
This branch includes the following new commits:
new 6d7d6060 Fix coverage after separation of ITs
new eb0db3f2 fix coverage calculation
The 2 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.
[jackrabbit-filevault] 02/02: fix coverage calculation
Posted by kw...@apache.org.
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 -->
<!-- ====================================================================== -->
[jackrabbit-filevault] 01/02: Fix coverage after separation of ITs
Posted by kw...@apache.org.
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 6d7d6060afb85e88d71a360505bd3a60e72d7ba0
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Jul 10 16:22:31 2023 +0200
Fix coverage after separation of ITs
---
README.md | 8 +--
parent/pom.xml | 25 ---------
pom.xml | 8 +++
vault-coverage-aggregate/pom.xml | 106 +++++++++++++++++++++++++++++++++++++++
4 files changed, 118 insertions(+), 29 deletions(-)
diff --git a/README.md b/README.md
index e34462ae..fff0d6f6 100644
--- a/README.md
+++ b/README.md
@@ -2,10 +2,10 @@

[](https://search.maven.org/artifact//org.apache.jackrabbit.vault/vault-cli)
[](https://ci-builds.apache.org/job/Jackrabbit/job/filevault/job/master/)
-[](https://sonarcloud.io/dashboard?id=apache_jackrabbit-filevault)
-[](https://sonarcloud.io/component_measures/metric/coverage/list?id=apache_jackrabbit-filevault)
-[](https://sonarcloud.io/component_measures/metric/reliability_rating/list?id=apache_jackrabbit-filevault)
-[](https://sonarcloud.io/component_measures/metric/security_rating/list?id=apache_jackrabbit-filevault)
+[](https://sonarcloud.io/summary/overall?id=apache_jackrabbit-filevault)
+[](https://sonarcloud.io/component_measures?metric=Coverage&view=list&id=apache_jackrabbit-filevault)
+[](https://sonarcloud.io/project/issues?resolved=false&types=BUG&id=apache_jackrabbit-filevault)
+[](https://sonarcloud.io/project/issues?resolved=false&types=VULNERABILITY&id=apache_jackrabbit-filevault)
Welcome to Apache Jackrabbit FileVault
===========================================================
diff --git a/parent/pom.xml b/parent/pom.xml
index 5bfd6602..7a47e873 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -574,31 +574,6 @@ Bundle-Category: jackrabbit
<append>true</append>
</configuration>
</execution>
- <execution>
- <id>merge-unit-and-it</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>merge</goal>
- </goals>
- <configuration>
- <fileSets>
- <fileSet>
- <directory>${project.build.directory}</directory>
- <includes>
- <include>jacoco-unit.exec</include>
- <include>jacoco-it.exec</include>
- </includes>
- </fileSet>
- </fileSets>
- </configuration>
- </execution>
- <execution>
- <id>report-merged</id>
- <phase>verify</phase>
- <goals>
- <goal>report</goal>
- </goals>
- </execution>
</executions>
</plugin>
diff --git a/pom.xml b/pom.xml
index ba4b605c..a8e8c79a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,6 +55,8 @@
<properties>
<project.build.outputTimestamp>2023-01-05T15:25:16Z</project.build.outputTimestamp>
+ <!-- add some coverage excludes -->
+ <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/vault-coverage-aggregate/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>
<distributionManagement>
@@ -386,5 +388,11 @@ 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
new file mode 100644
index 00000000..21a49564
--- /dev/null
+++ b/vault-coverage-aggregate/pom.xml
@@ -0,0 +1,106 @@
+<?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>3.6.9-SNAPSHOT</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>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-core-it-execution-jr2-min</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-core-it-execution-oak-min</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-core-it-execution-oak-max</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-davex</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-diff</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-rcp</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-sync</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-validation</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vault-vlt</artifactId>
+ <version>${project.version}</version>
+ </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>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file