You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Resolver and Maven should be move in lockstepΒ #772
As I see your Maven 3 plugin uses Maven 3.9.11 and Resolver 2.0.11 as build time dependencies. At runtime, the plugin runs within env provided by Maven runtime (and Maven and Resolver bits are provided by the env, not your dependencies).
On global note, Maven 3 lineage uses Resolver 1.x lineage, while Maven 4 lineage uses Resolver 2.x. While the Resolver APIs tend to keep backward compatibility, using Resolver 2.x for Maven 3 plugin is totally inappropriate, not to mention issues like transport renames (http transport -> apache transport), etc... This can just cause issues.
In general, when a Maven 3 plugin is built against Maven 3, you want to keep major dependencies in "lockstep" with the Maven version (in this case, Maven 3.9.11 uses Resolver 1.9.24).
This needs to be changed, as again, this just opens door for possible issues. Resolver 2 was never meant to be used with Maven 3 codebase or plugins.
This is a Maven 3 plugin, so should use "maven3 stuff" (Resolver 1.x, and Resolver 2.x is not "maven3 stuff"). And Maven4 provides backward Maven 3 compatibility, and it is guaranteed by it.
For you (as author of Maven 3 plugin) there is one thing you need to make sure: stay away from any deprecated class/method from Resolver 1.x (as they are gone in Resolver 2.x) and obey this https://maven.apache.org/resolver/api-compatibility.html
Raised a PR to address this, and instructed dependabot to leave these alone going forwards.
This sort of check might be useful to have as a goal in maven-plugin-plugin perhaps to help users identify version conflicts going forwards? Not sure how easy that would be to implement though.
The Maven BOM that I can see in Maven 4 should simplify this once Maven 3 is end-of-life though, so perhaps it isn't worth it in this case.
Activity
ascopes commentedon Aug 22, 2025
What would you suggest the best direction of change for this would be, to maintain cross-compatibility?
Happy to take a PR to adjust this.
cstamas commentedon Aug 22, 2025
See: https://lists.apache.org/thread/t74kk6rm3p8gmfz25c872ffqcbr3ggvh
This is a Maven 3 plugin, so should use "maven3 stuff" (Resolver 1.x, and Resolver 2.x is not "maven3 stuff"). And Maven4 provides backward Maven 3 compatibility, and it is guaranteed by it.
For you (as author of Maven 3 plugin) there is one thing you need to make sure: stay away from any deprecated class/method from Resolver 1.x (as they are gone in Resolver 2.x) and obey this https://maven.apache.org/resolver/api-compatibility.html
ascopes commentedon Aug 22, 2025
we should be able to pin the dependency to 1.x in that case
GH-772: Pin resolver API to v1.9.24
GH-772: Exclude Maven components from dependabot updates
GH-772: Exclude Maven components from dependabot updates
ascopes commentedon Aug 23, 2025
Raised a PR to address this, and instructed dependabot to leave these alone going forwards.
This sort of check might be useful to have as a goal in
maven-plugin-pluginperhaps to help users identify version conflicts going forwards? Not sure how easy that would be to implement though.The Maven BOM that I can see in Maven 4 should simplify this once Maven 3 is end-of-life though, so perhaps it isn't worth it in this case.
Merge pull request #773 from ascopes/task/gh-772-resolver-api-version