Skip to content

[Bug]: Resolver and Maven should be move in lockstepΒ #772

Closed

Description

@cstamas

Brief description

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.

Steps to reproduce

No reproducer

Error message


Logs


Operating system

All

JDK version

All

Maven version

3.9.x

Plugin version

Those using Resolver 2.x

Protoc version

Irrelevant

Additional details

No response

Would you like to contribute a bugfix?

  • Yes, I'd like to contribute a bugfix!

Activity

  1. ascopes commented on Aug 22, 2025

    @ascopes
    Owner

    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.

  2. cstamas commented on Aug 22, 2025

    @cstamas
    ContributorAuthor

    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

  3. ascopes commented on Aug 22, 2025

    @ascopes
    Owner

    we should be able to pin the dependency to 1.x in that case

  4. added 3 commits that reference this issue on Aug 23, 2025
  5. ascopes commented on Aug 23, 2025

    @ascopes
    Owner

    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.

  6. added a commit that references this issue on Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions