From 59d07e2a45a4f459f5362d3820a474d27c0c026f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C9=B9=C7=9D=C6=83=C4=B1=C7=9D=E2=85=81=20=C9=AFo=E2=8A=A5?= Date: Fri, 20 Oct 2017 12:27:36 +0200 Subject: [PATCH 1/7] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c747449..2f34ae7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { } stage('Test'){ steps { - sh 'mvn test' + sh 'mvn test pmd:pmd' junit 'target/surefire-reports/*.xml' pmd canRunOnFailed: true, pattern: 'target/pmd.xml' From 445532e1e6ae3f361bdd727424113ef0da0e02b5 Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Fri, 18 Oct 2019 06:31:41 +0200 Subject: [PATCH 2/7] use latest version of pmd --- pom.xml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index d24799f..b2717bb 100644 --- a/pom.xml +++ b/pom.xml @@ -19,20 +19,13 @@ 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 + + From 24fd6db2a89a4202b8c8c71827739df77dcbdfff Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Fri, 18 Oct 2019 06:42:19 +0200 Subject: [PATCH 3/7] updated to latest reporting --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f34ae7..ad68bde 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,10 +9,7 @@ pipeline { } stage('Test'){ steps { - sh 'mvn test pmd:pmd' - junit 'target/surefire-reports/*.xml' - pmd canRunOnFailed: true, pattern: 'target/pmd.xml' - + sh 'mvn test pmd:pmd pmd:cpd' } } stage('Deploy') { @@ -23,7 +20,11 @@ pipeline { } post { always { - archive 'target/*.jar' + 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: pmdParser(pattern: '**/target/pmd.xml') + archiveArtifact 'target/*.jar' } } } From 8ea659604eed23ddc622a62434f738f839cceba9 Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Fri, 18 Oct 2019 06:44:15 +0200 Subject: [PATCH 4/7] fix syntax for archive --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ad68bde..3c6980b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ pipeline { recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()] recordIssues enabledForFailure: true, tool: cpd(pattern: '**/target/cpd.xml') recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml') - archiveArtifact 'target/*.jar' + archive 'target/*.jar' } } } From a4843bf60ef61e307a00d10ffeb1d3e5aa6dbd99 Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Fri, 18 Oct 2019 10:22:36 +0200 Subject: [PATCH 5/7] have checkstyle --- Jenkinsfile | 3 ++- pom.xml | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3c6980b..a56b97e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { } stage('Test'){ steps { - sh 'mvn test pmd:pmd pmd:cpd' + sh 'mvn test checkstyle:check pmd:pmd pmd:cpd' } } stage('Deploy') { @@ -24,6 +24,7 @@ pipeline { recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()] recordIssues enabledForFailure: true, tool: cpd(pattern: '**/target/cpd.xml') recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml') + recordIssues enabledForFailure: true, tool: checkStyle(reportEncoding: 'UTF-8') archive 'target/*.jar' } } diff --git a/pom.xml b/pom.xml index b2717bb..9ad884d 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,19 @@ org.apache.maven.plugins maven-pmd-plugin 3.11.0 - + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.0 + + + + checkstyle + + + + From 003c53824851dcb4e1b273712af18eb76b91b1e8 Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Fri, 18 Oct 2019 10:41:26 +0200 Subject: [PATCH 6/7] back to state before checkstyle --- Jenkinsfile | 3 +-- pom.xml | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a56b97e..3c6980b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { } stage('Test'){ steps { - sh 'mvn test checkstyle:check pmd:pmd pmd:cpd' + sh 'mvn test pmd:pmd pmd:cpd' } } stage('Deploy') { @@ -24,7 +24,6 @@ pipeline { recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()] recordIssues enabledForFailure: true, tool: cpd(pattern: '**/target/cpd.xml') recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml') - recordIssues enabledForFailure: true, tool: checkStyle(reportEncoding: 'UTF-8') archive 'target/*.jar' } } diff --git a/pom.xml b/pom.xml index 9ad884d..0b48b47 100644 --- a/pom.xml +++ b/pom.xml @@ -26,18 +26,6 @@ maven-pmd-plugin 3.11.0 - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.1.0 - - - - checkstyle - - - - From 7b4b323404de59b2e9c2ba78dd55556345ed046a Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Fri, 18 Oct 2019 12:33:08 +0200 Subject: [PATCH 7/7] have checkstyle --- Jenkinsfile | 3 ++- pom.xml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3c6980b..17ac6c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { } stage('Test'){ steps { - sh 'mvn test pmd:pmd pmd:cpd' + sh 'mvn test checkstyle:checkstyle pmd:pmd pmd:cpd' } } stage('Deploy') { @@ -23,6 +23,7 @@ pipeline { 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 0b48b47..05d7b14 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,21 @@ maven-pmd-plugin 3.11.0 + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.0 + + google_checks.xml + + + + + checkstyle + + + +