-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MPMD-366] Update parent pom to 39 #118
Conversation
This is failing locally with java 11 on a Mac. Looks like an XML reader or writer might have screwed up encoding somewhere: \n[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.21.0-SNAPSHOT:check (default) on project mpmd-138-mod-1: Unable to read PMD results xml: /Users/elharo/maven-pmd-plugin/target/it/mpmd-138/mod-1/target/pmd.xml: UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible (position: START_DOCUMENT seen <?xml version="1.0" encoding="ISO-8859-1"... @1:42) -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException\n[ERROR] \n[ERROR] After correcting the problems, you can resume the build with the command\n[ERROR] mvn -rf :mpmd-138-mod-1\nRunning post-build script: /Users/elharo/maven-pmd-plugin/target/it/mpmd-138/verify.groovy\n' |
I don't see a byte order mark in the hex dump so the error message is strange. (base) ~/maven-pmd-plugin$ hexdump /Users/elharo/maven-pmd-plugin/target/it/mpmd-138/mod-1/target/pmd.xml |
specific error likely comes from org.codehaus.plexus.util.xml.pull somewhere. Whether that is buggy or there's an actual problem in this file I'm not yet sure. |
specifically the message comes from https://github.com/codehaus-plexus/plexus-utils/blob/bf198ff5d8f3bd5eb90d09826006c4d419884660/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java#L3439
Just a guess, but it's possible it's not about a byte order mark at all. That is, the encoding is specified as UTF-8 which conflicts with what's defined in the file. |
Problem is likely in this and similar code in the several violation check mojos:
It passes or fails depending on the system encoding. Instead it should use an inputstream rather than a reader and rely on the XML parser to detect the encoding. |
I filed and will have to fix MPMD-369 before this PR can proceed. :-( |
No description provided.