diff --git a/Jenkinsfile b/Jenkinsfile index c747449..17ac6c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,10 +9,7 @@ pipeline { } stage('Test'){ steps { - sh 'mvn test' - junit 'target/surefire-reports/*.xml' - pmd canRunOnFailed: true, pattern: 'target/pmd.xml' - + sh 'mvn test checkstyle:checkstyle pmd:pmd pmd:cpd' } } stage('Deploy') { @@ -23,6 +20,11 @@ pipeline { } post { always { + junit 'target/surefire-reports/*.xml' + recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()] + recordIssues enabledForFailure: true, tool: cpd(pattern: '**/target/cpd.xml') + recordIssues enabledForFailure: true, tool: checkStyle(reportEncoding: 'UTF-8') + recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml') archive 'target/*.jar' } } diff --git a/pom.xml b/pom.xml index d24799f..05d7b14 100644 --- a/pom.xml +++ b/pom.xml @@ -19,20 +19,28 @@ test - - - - org.apache.maven.plugins - maven-pmd-plugin - 2.7.1 - - false - 1.8 - - /rulesets/basic.xml - - - - + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.11.0 + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.0 + + google_checks.xml + + + + + checkstyle + + + + +