From ef6baa3a54833be918f5b59caafd477a05385684 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 27 Apr 2024 21:34:30 +0200 Subject: [PATCH] Fail build on CheckStyle or PMD violations. To see all CheckStyle and PMD violations in a maven build you need to run maven with option `-Dcheckstyle.failOnViolation=false` and `-Dpmd.failOnViolation=false`. --- pom.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index de0e43d9..03dcf42e 100644 --- a/pom.xml +++ b/pom.xml @@ -551,7 +551,6 @@ ${maven-pmd-plugin.version} false - false ${java.version} @@ -576,6 +575,7 @@ run-pmd-java pmd + check cpd verify @@ -592,6 +592,7 @@ run-pmd-tests pmd + check cpd verify @@ -618,7 +619,7 @@ false true - false + warning @@ -631,7 +632,7 @@ run-checkstyle-java - checkstyle + check verify @@ -644,7 +645,7 @@ run-checkstyle-tests - checkstyle + check verify @@ -652,6 +653,7 @@ true etc/checkstyle-tests-configuration.xml ${project.build.directory}/checkstyle-tests/checkstyle-result.xml +