ascheman opened a new pull request, #81:
URL: https://github.com/apache/maven-jdeprscan-plugin/pull/81
## Problem
The `list-default` and `list-forremoval` ITs invoke the plugin's `list` goal
by coordinates without a version:
invoker.goals = org.apache.maven.plugins:maven-jdeprscan-plugin:list
and the IT projects have no `pom.xml`. Maven runs the goal in
`standalone-pom` mode and resolves the *latest released* plugin (currently
3.0.0) rather than the reactor build — so these two ITs never exercise the code
under test.
This surfaced in #74 (Maven 4 enablement), where @Bukama and
@slawekjaranowski diagnosed the accompanying `list-*` failure: the builds there
show `maven-jdeprscan-plugin:3.0.0:list`, and the Maven-4 NPE is a core issue
fixed by apache/maven#12336. That analysis stopped at the NPE; this PR
addresses the orthogonal fact that the ITs test the released plugin regardless
of the Maven version.
## Fix
Add a minimal `pom.xml` to each IT that declares the plugin version as
`@project.version@` (interpolated by the invoker, exactly as the scan ITs
already rely on) and invoke the goal via the `jdeprscan:list` prefix, so the
pinned version is used.
## Verification
`mvn clean verify -P run-its` is green on Maven 3.9.16 and on Maven
4.0.0-SNAPSHOT; the `list-*` build logs now show
`jdeprscan:3.0.1-SNAPSHOT:list` (the reactor version) instead of `3.0.0`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]