Switch Jacoco's code coverage format to XML reports (#882)
* jacoco xml report configuration + create exec files per module + introduce report aggregation in test report module + remove failsafe plugin usage + set xml report path for sonar Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * add update-server dependency to test report Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * Reorder elements in pom Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * undo surefire / failsafe changes Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com> * set remote sonar host Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com>
This commit is contained in:
committed by
Dominic Schabel
parent
51982a77e3
commit
c0ed1cdfbe
@@ -20,10 +20,6 @@
|
|||||||
<name>hawkBit :: DMF</name>
|
<name>hawkBit :: DMF</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<jacoco.outputDir>${project.basedir}/../../target/</jacoco.outputDir>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>hawkbit-dmf-api</module>
|
<module>hawkbit-dmf-api</module>
|
||||||
<module>hawkbit-dmf-amqp</module>
|
<module>hawkbit-dmf-amqp</module>
|
||||||
|
|||||||
@@ -20,10 +20,6 @@
|
|||||||
<name>hawkBit :: Repository</name>
|
<name>hawkBit :: Repository</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<jacoco.outputDir>${project.basedir}/../../target/</jacoco.outputDir>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>hawkbit-repository-jpa</module>
|
<module>hawkbit-repository-jpa</module>
|
||||||
<module>hawkbit-repository-api</module>
|
<module>hawkbit-repository-api</module>
|
||||||
@@ -31,5 +27,4 @@
|
|||||||
<module>hawkbit-repository-core</module>
|
<module>hawkbit-repository-core</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -19,10 +19,6 @@
|
|||||||
<artifactId>hawkbit-rest-parent</artifactId>
|
<artifactId>hawkbit-rest-parent</artifactId>
|
||||||
<name>hawkBit :: REST</name>
|
<name>hawkBit :: REST</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<jacoco.outputDir>${project.basedir}/../../target/</jacoco.outputDir>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>hawkbit-rest-core</module>
|
<module>hawkbit-rest-core</module>
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
http://www.eclipse.org/legal/epl-v10.html
|
http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.hawkbit</groupId>
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
@@ -17,7 +18,138 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<artifactId>hawkbit-test-report</artifactId>
|
<artifactId>hawkbit-test-report</artifactId>
|
||||||
<name>hawkBit :: Test Report</name>
|
<name>hawkBit :: Test Report</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-security-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-security-integration</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-http-security</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-repository-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-repository-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-repository-jpa</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-repository-test</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-artifact-repository-filesystem</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-autoconfigure</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-ui</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-ddi-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-ddi-resource</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-mgmt-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-mgmt-resource</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-rest-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-rest-docs</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-dmf-amqp</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-dmf-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-dmf-rabbitmq-test</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.hawkbit</groupId>
|
||||||
|
<artifactId>hawkbit-update-server</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>aggregate-reports</id>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report-aggregate</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${jacoco.outputDir}/jacoco-aggregate</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>generateTestReport</id>
|
<id>generateTestReport</id>
|
||||||
@@ -77,4 +209,5 @@
|
|||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
</project>
|
|
||||||
|
</project>
|
||||||
|
|||||||
33
pom.xml
33
pom.xml
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
@@ -187,13 +187,19 @@
|
|||||||
<sonar.github.repository>eclipse/hawkbit</sonar.github.repository>
|
<sonar.github.repository>eclipse/hawkbit</sonar.github.repository>
|
||||||
<sonar.links.homepage>https://www.eclipse.org/hawkbit</sonar.links.homepage>
|
<sonar.links.homepage>https://www.eclipse.org/hawkbit</sonar.links.homepage>
|
||||||
<sonar.links.ci>https://circleci.com/gh/eclipse/hawkbit</sonar.links.ci>
|
<sonar.links.ci>https://circleci.com/gh/eclipse/hawkbit</sonar.links.ci>
|
||||||
<sonar.exclusions>**/target/generated-sources/apt/**,**/src/test/**,**/src/main/java/org/eclipse/hawkbit/repository/test/**</sonar.exclusions>
|
<sonar.exclusions>
|
||||||
<sonar.coverage.exclusions>**/src/main/java/org/eclipse/hawkbit/ui/**,**/target/generated-sources/apt/**,**/src/main/java/org/eclipse/hawkbit/repository/test/**,**/examples/**</sonar.coverage.exclusions>
|
**/target/generated-sources/apt/**,**/src/test/**,**/src/main/java/org/eclipse/hawkbit/repository/test/**
|
||||||
<jacoco.version>0.8.2</jacoco.version>
|
</sonar.exclusions>
|
||||||
<jacoco.outputDir>${project.basedir}/../target/</jacoco.outputDir>
|
<sonar.coverage.exclusions>
|
||||||
<jacoco.reportPath>${jacoco.outputDir}/jacoco-ut.exec</jacoco.reportPath>
|
**/src/main/java/org/eclipse/hawkbit/ui/**,**/target/generated-sources/apt/**,**/src/main/java/org/eclipse/hawkbit/repository/test/**,**/examples/**
|
||||||
<jacoco.itReportPath>${jacoco.outputDir}/jacoco-it.exec</jacoco.itReportPath>
|
</sonar.coverage.exclusions>
|
||||||
<sonar.jacoco.reportPaths>${jacoco.reportPath},${jacoco.itReportPath}</sonar.jacoco.reportPaths>
|
<jacoco.version>0.8.4</jacoco.version>
|
||||||
|
<jacoco.outputDir>${project.build.directory}</jacoco.outputDir>
|
||||||
|
<sonar.coverage.jacoco.xmlReportPaths>
|
||||||
|
${project.basedir}/../hawkbit-test-report/target/jacoco-aggregate/jacoco.xml,
|
||||||
|
${project.basedir}/../../hawkbit-test-report/target/jacoco-aggregate/jacoco.xml
|
||||||
|
</sonar.coverage.jacoco.xmlReportPaths>
|
||||||
|
|
||||||
<!-- Sonar - END -->
|
<!-- Sonar - END -->
|
||||||
|
|
||||||
<!-- ************************ -->
|
<!-- ************************ -->
|
||||||
@@ -260,6 +266,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>${jacoco.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>prepare-ut-agent</id>
|
<id>prepare-ut-agent</id>
|
||||||
@@ -268,21 +275,17 @@
|
|||||||
<goal>prepare-agent</goal>
|
<goal>prepare-agent</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<destFile>${jacoco.reportPath}</destFile>
|
|
||||||
<propertyName>jacoco.agent.ut.arg</propertyName>
|
<propertyName>jacoco.agent.ut.arg</propertyName>
|
||||||
<append>true</append>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>prepare-it-agent</id>
|
<id>prepare-it-agent</id>
|
||||||
<phase>pre-integration-test</phase>
|
<phase>pre-integration-test</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>prepare-agent</goal>
|
<goal>prepare-agent-integration</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<destFile>${jacoco.itReportPath}</destFile>
|
|
||||||
<propertyName>jacoco.agent.it.arg</propertyName>
|
<propertyName>jacoco.agent.it.arg</propertyName>
|
||||||
<append>true</append>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
@@ -384,7 +387,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
</pluginExecutionFilter>
|
</pluginExecutionFilter>
|
||||||
<action>
|
<action>
|
||||||
<ignore />
|
<ignore/>
|
||||||
</action>
|
</action>
|
||||||
</pluginExecution>
|
</pluginExecution>
|
||||||
</pluginExecutions>
|
</pluginExecutions>
|
||||||
|
|||||||
Reference in New Issue
Block a user