Enable coverage.
@@ -3,21 +3,31 @@ node('java11-agent') {
checkout scm
}
- stage ('Build and Analysis') {
- withMaven(maven: 'mvn-default', mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
- sh 'mvn -V -e clean verify -Dmaven.test.failure.ignore'
- }
-
+ stage ('Git mining') {
+ discoverGitReferenceBuild()
mineRepository()
gitDiffStat()
+ }
+
+ stage ('Build, Test, and Static Analysis') {
+ withMaven(mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
+ sh 'mvn -V -e clean verify -Dmaven.test.failure.ignore -Dgpg.skip'
+ }
+
recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java', filters:[excludeFile('.*Assert.java')]
recordIssues tool: errorProne(), healthy: 1, unhealthy: 20
+
junit testResults: '**/target/*-reports/TEST-*.xml'
- recordIssues tools: [mavenConsole(),
- checkStyle(pattern: 'target/checkstyle-result.xml'),
+ publishCoverage adapters: [jacocoAdapter('**/*/jacoco.xml')], sourceFileResolver: sourceFiles('STORE_ALL_BUILD')
+
+ recordIssues tools: [checkStyle(pattern: 'target/checkstyle-result.xml'),
spotBugs(pattern: 'target/spotbugsXml.xml'),
pmdParser(pattern: 'target/pmd.xml'),
cpd(pattern: 'target/cpd.xml'),
taskScanner(highTags:'FIXME', normalTags:'TODO', includePattern: '**/*.java', excludePattern: 'target/**/*')]
}
+
+ stage ('Collect Maven Warnings') {
+ recordIssues tool: mavenConsole()
+ }
}
