fix sonarqube code coverage

This commit is contained in:
Sebastian Sdorra
2020-01-13 15:56:28 +01:00
parent a2c9eeb858
commit 98febefa64
2 changed files with 34 additions and 23 deletions

2
Jenkinsfile vendored
View File

@@ -33,7 +33,7 @@ node('docker') {
}
stage('Unit Test') {
mvn 'test -Dsonia.scm.test.skip.hg=true -Dmaven.test.failure.ignore=true'
mvn 'test -Pcoverage -Dsonia.scm.test.skip.hg=true -Dmaven.test.failure.ignore=true'
}
stage('Integration Test') {

55
pom.xml
View File

@@ -685,28 +685,6 @@
<version>2.6</version>
</plugin>
<!-- code coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- reporting -->
<plugin>
@@ -787,6 +765,39 @@
</profile>
<profile>
<id>coverage</id>
<build>
<plugins>
<!-- code coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>APIviz</id>
<activation>