This is an automated email from the ASF dual-hosted git repository.

adangel pushed a commit to branch pmd7
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit 815723ccee6843c53d61943185af42b0d71d8b89
Author: Andreas Dangel <adan...@apache.org>
AuthorDate: Fri Jun 10 09:03:20 2022 +0200

    Fix integration tests
---
 src/it/MPMD-219-pmd-processing-error/verify.groovy        | 3 +--
 src/it/MPMD-243-excludeFromFailureFile/config/ruleset.xml | 2 +-
 src/it/MPMD-244-logging/verify.groovy                     | 6 +++---
 src/it/MPMD-304-toolchain-support/verify.groovy           | 4 ++--
 src/it/mpmd-138/verify.groovy                             | 2 +-
 5 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/it/MPMD-219-pmd-processing-error/verify.groovy 
b/src/it/MPMD-219-pmd-processing-error/verify.groovy
index 0656c50..9cf76cc 100644
--- a/src/it/MPMD-219-pmd-processing-error/verify.groovy
+++ b/src/it/MPMD-219-pmd-processing-error/verify.groovy
@@ -20,5 +20,4 @@
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
 assert buildLog.text.contains( "PMD processing errors" )
-assert buildLog.text.contains( "Error while parsing" )
-assert buildLog.text.contains( "BrokenFile.java" )
+assert buildLog.text.contains( "BrokenFile.java: ParseException: Encountered" )
diff --git a/src/it/MPMD-243-excludeFromFailureFile/config/ruleset.xml 
b/src/it/MPMD-243-excludeFromFailureFile/config/ruleset.xml
index c337933..47daac1 100644
--- a/src/it/MPMD-243-excludeFromFailureFile/config/ruleset.xml
+++ b/src/it/MPMD-243-excludeFromFailureFile/config/ruleset.xml
@@ -26,5 +26,5 @@ under the License.
     MPMD-243
   </description>
 
-  <rule ref="rulesets/java/imports.xml/TooManyStaticImports"/>
+  <rule ref="category/java/codestyle.xml/TooManyStaticImports"/>
 </ruleset>
diff --git a/src/it/MPMD-244-logging/verify.groovy 
b/src/it/MPMD-244-logging/verify.groovy
index 459b2b9..e561fb8 100644
--- a/src/it/MPMD-244-logging/verify.groovy
+++ b/src/it/MPMD-244-logging/verify.groovy
@@ -20,12 +20,12 @@
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
 assert buildLog.text.contains( "PMD processing errors" )
-assert buildLog.text.contains( "Error while parsing" )
+assert buildLog.text.contains( "ParseException" )
 
 String disabledPath = new File( basedir, 
'logging-disabled/src/main/java/BrokenFile.java' ).getCanonicalPath()
 String enabledPath = new File( basedir, 
'logging-enabled/src/main/java/BrokenFile.java' ).getCanonicalPath()
 
 // logging disabled: the pmd exception is only output through the processing 
error reporting (since MPMD-246)
-assert 1 == buildLog.text.count( "net.sourceforge.pmd.PMDException: Error 
while parsing ${disabledPath}" )
+assert 1 == buildLog.text.count( "${disabledPath}: ParseException: 
Encountered" )
 // logging enabled: the pmd exception is output twice: through the processing 
error reporting (since MPMD-246) and through PMD's own logging
-assert 2 == buildLog.text.count( "net.sourceforge.pmd.PMDException: Error 
while parsing ${enabledPath}" )
+assert 2 == buildLog.text.count( "${enabledPath}: ParseException: Encountered" 
)
diff --git a/src/it/MPMD-304-toolchain-support/verify.groovy 
b/src/it/MPMD-304-toolchain-support/verify.groovy
index 7370225..21aa349 100644
--- a/src/it/MPMD-304-toolchain-support/verify.groovy
+++ b/src/it/MPMD-304-toolchain-support/verify.groovy
@@ -29,8 +29,8 @@ assert buildLog.text.contains( '[INFO] You have 1 CPD 
duplication' )
 
 File pmdReport = new File( basedir, 'target/pmd.xml' )
 assert pmdReport.exists()
-assert pmdReport.text.contains( '<violation beginline="24" endline="24" 
begincolumn="29" endcolumn="34" rule="ExtendsObject"' )
-assert pmdReport.text.contains( '<violation beginline="36" endline="36" 
begincolumn="9" endcolumn="31" rule="DontCallThreadRun"' )
+assert pmdReport.text.contains( '<violation beginline="24" endline="24" 
begincolumn="29" endcolumn="35" rule="ExtendsObject"' )
+assert pmdReport.text.contains( '<violation beginline="36" endline="36" 
begincolumn="9" endcolumn="32" rule="DontCallThreadRun"' )
 
 File pmdSite = new File( basedir, 'target/site/pmd.html' )
 assert pmdSite.exists()
diff --git a/src/it/mpmd-138/verify.groovy b/src/it/mpmd-138/verify.groovy
index 0a3a32b..2f6d345 100644
--- a/src/it/mpmd-138/verify.groovy
+++ b/src/it/mpmd-138/verify.groovy
@@ -23,7 +23,7 @@ assert buildLog.exists()
 
 // Module 1
 assert 1 == buildLog.getText().count('[INFO] PMD Failure: test.MyClass:27 
Rule:UnnecessarySemicolon Priority:3 Unnecessary semicolon')
-assert 1 == buildLog.getText().count('[INFO] PMD Failure: test.MyClass:28 
Rule:UnnecessaryReturn Priority:3 Avoid unnecessary return statements')
+assert 1 == buildLog.getText().count('[INFO] PMD Failure: test.MyClass:28 
Rule:UnnecessaryReturn Priority:3 Unnecessary return statement')
 assert 1 == buildLog.getText().count('[INFO] You have 2 PMD violations. For 
more details see:')
 
 // Module 2

Reply via email to