Adding jacoco report generation and publishing
This commit is contained in:
parent
f8b2979a8f
commit
91e5fb2ce5
|
@ -52,7 +52,13 @@ node('linux') {
|
|||
// Run test phase / ignore test failures
|
||||
sh "mvn -B install -Dmaven.test.failure.ignore=true"
|
||||
// Report failures in the jenkins UI
|
||||
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
|
||||
step([$class: 'JUnitResultArchiver',
|
||||
testResults: '**/target/surefire-reports/TEST-*.xml'])
|
||||
// Collect up the jacoco execution results
|
||||
step([$class: 'JacocoPublisher',
|
||||
execPattern:'target/jacoco*.exec',
|
||||
classPattern: 'target/classes',
|
||||
sourcePattern: 'src/main/java'])
|
||||
}
|
||||
if(isUnstable())
|
||||
{
|
||||
|
|
25
pom.xml
25
pom.xml
|
@ -171,6 +171,27 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.7.7.201606060606</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>jacoco-initialize</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jacoco-site</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
|
@ -270,9 +291,9 @@
|
|||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.17</version>
|
||||
<configuration>
|
||||
<argLine>-showversion -Xmx1g -Xms1g -XX:+PrintGCDetails</argLine>
|
||||
<argLine>@{argLine} -showversion -Xmx1g -Xms1g -XX:+PrintGCDetails</argLine>
|
||||
<failIfNoTests>false</failIfNoTests>
|
||||
<runMode>random</runMode>
|
||||
<forkCount>1</forkCount>
|
||||
<systemProperties>
|
||||
<!--
|
||||
<property>
|
||||
|
|
Loading…
Reference in New Issue