[MPMD-412] clean up unused code by elharo · Pull Request #190 · apache/maven-pmd-plugin
elharo
marked this pull request as ready for review
Bukama
left a comment
•
Loading
Bukama
left a comment
•
Loading
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mvn clean verify site -P run-its fails on my windows machine
Apache Maven 4.0.0-rc-3 (3952d00ce65df6753b63a51e86b1f626c55a8df2)
Maven home: C:\apache-maven-4.0.0-rc-3
Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: C:\JDK\Java21
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "winnt"
[...]
[INFO] Building: MPMD-323-multi-module-basedir\pom.xml
[INFO] run post-build script verify.groovy
[INFO] MPMD-323-multi-module-basedir\pom.xml ............ SUCCESS (3.844 s)
[INFO] Building: MPMD-323-ruleset-basedir-jgitver\pom.xml
[INFO] run post-build script verify.groovy
[INFO] Assertion failed:
assert pmdXml.exists()
| |
| false
D:\Github\Maven\maven-pmd-plugin\target\it\MPMD-323-ruleset-basedir-jgitver\target\pmd.xml
[INFO] MPMD-323-ruleset-basedir-jgitver\pom.xml ......... FAILED (8.924 s)
[INFO] Building: MPMD-332-JDK18\pom.xml
[INFO] run post-build script verify.groovy
[INFO] MPMD-332-JDK18\pom.xml ........................... SUCCESS (4.240 s)
[INFO] Building: MPMD-335-aggregate-classpath-repositories\pom.xml
[INFO] run post-build script verify.groovy
[INFO] The build exited with code 1. See D:\Github\Maven\maven-pmd-plugin\target\it\MPMD-335-aggregate-classpath-repositories\build.log for details.
[INFO] MPMD-335-aggregate-classpath-repositories\pom.xml FAILED (1.542 s)
[INFO] Building: MPMD-348-JDK19\pom.xml
[INFO] MPMD-348-JDK19\pom.xml ........................... SKIPPED due to Toolchain
[INFO] Building: MPMD-365-JDK20\pom.xml
[INFO] Scanning for projects...
[ERROR] Some problems were encountered while processing the POMs
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.maven.plugins.pmd.it:mpmd335-parent:pom:1.0.0-SNAPSHOT (D:\Github\Maven\maven-pmd-plugin\target\it\MPMD-335-aggregate-classpath-repositories\pom.xml) has 1 error
[ERROR] 'repositories.repository.[corp1].url' contains an unsupported expression (only expressions starting with 'project.basedir' or 'project.rootDirectory' are supported). @ org.apache.maven.plugins.pmd.it:mpmd335-parent:1.0.0-SNAPSHOT, file:///D:/Github/Maven/maven-pmd-plugin/target/it/MPMD-335-aggregate-classpath-repositories/pom.xml, line 60, column 13
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Running post-build script: D:\Github\Maven\maven-pmd-plugin\target\it\MPMD-335-aggregate-classpath-repositories\verify.groovy
Finished post-build script: D:\Github\Maven\maven-pmd-plugin\target\it\MPMD-335-aggregate-classpath-repositories\verify.groovy
Interesting. Passed on the CI though. I wonder if that test is flaky?
No it's not compatible with Maven 4.
'repositories.repository.[corp1].url' contains an unsupported expression (only expressions starting with 'project.basedir' or 'project.rootDirectory' are supported).
The project.rootDirectory property only exists in Maven 4.
So the IT's repository definition using ${user.dir} is not compatible with Maven 4:
<repositories> <repository> <id>corp1</id> <url>file://${user.dir}/private-repo</url> </repository> </repositories>
Just tested it with Maven 3 and it's okay
D:\Github\Maven\maven-pmd-plugin>mvn clean verify -P run-its -V
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: C:\apache-maven-3.9.8
Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: C:\JDK\Java21
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
[...]
[INFO] Build Summary:
[INFO] Passed: 46, Failed: 0, Errors: 0, Skipped: 4
[INFO] -------------------------------------------------
[WARNING] The following builds were skipped:
[WARNING] * MPMD-304-toolchain-support\pom.xml
[WARNING] * MPMD-348-JDK19\pom.xml
[WARNING] * MPMD-365-JDK20\pom.xml
[WARNING] * MPMD-379-JDK21\pom.xml
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:40 min
[INFO] Finished at: 2025-04-19T20:57:10+02:00
[INFO] ------------------------------------------------------------------------
elharo
deleted the
new_branch_with_a1
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters