jenkins: try to log java files

This commit is contained in:
Paul Campbell 2018-03-10 17:04:56 +00:00
parent 1439dcdb5e
commit 8619824c41

View file

@ -21,14 +21,17 @@ pipeline {
} }
} }
stage('Static Code Analysis') { stage('Static Code Analysis') {
when { expression { findFiles(glob: '**/src/main/java/*.java').length > 0 } } when { expression { findFiles(glob: '**/src/main/java/**/*.java').length > 0 } }
steps { steps {
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
withSonarQubeEnv('sonarqube') { sh "${mvn} compile"
sh "${mvn} compile checkstyle:checkstyle pmd:pmd org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar" sh "${mvn} checkstyle:checkstyle"
} sh "${mvn} pmd:pmd"
}
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: '' pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
withSonarQubeEnv('sonarqube') {
sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
}
}
} }
} }
stage('Build Java 9') { stage('Build Java 9') {