Skip to content

[MNG-8494] Restore Maven 3 compatibility #9943

Closed

Description

@jira-importer

Guillaume Nodet opened MNG-8494 and commented

The Maven 3 modules have been moved into the /compat/ directory.
But before this happened and the new Maven 4 API was introduced, those classes undergo quite some incompatible changes. Given they are now deprecated, it would make sense to restore them to full Maven 3.9.x compatibility.


Issue Links:

  • MNG-7266 Remove maven-compat module

  • MNG-8371 Document Deprecation

  • MNG-6561 New RepositorySystem implementation as replacement of deprecated from maven-compat

  • MPIR-475 Drop usage of maven-artifact-transfer

  • MSITE-833 Remove dependency to maven-compat

  • MPLUGINTESTING-70 maven-compat requirement

Remote Links:

Backported to: 4.0.0-rc-3

Activity

  1. jira-importer commented on Jan 6, 2025

    @jira-importer
    Author

    Sylwester Lachiewicz commented

    Maybe there is a way to completely lose it somewhere maven-compat for 3.x ? Any reason why something needs it in Maven 3.x world? I believe that some parts of maven-plugin-testing may have dependencies - but what else?

  2. jira-importer commented on Jan 6, 2025

    @jira-importer
    Author

    Guillaume Nodet commented

    The maven-compat is required at runtime when building sites for example. Maven itself does not use it.

    I once had a goal to remove maven-compat completely, but that's not on my radar anymore.

    Here again, I think switching plugins to the new API will solve the problem automatically, so not sure it's worth pursuing. I'd rather switch them directly to the new Maven API. Maven 5 should drop Maven 3 compatibility and all /compat/maven-* artifacts imho. Maven 4 currently keeps some level of compatibility with Maven 3 and Maven 2...

  3. jira-importer commented on Jan 7, 2025

    @jira-importer
    Author

    Sylwester Lachiewicz commented

    Moving to API 4 could be done if we have docs on "what and how" to move from API 3 and all deprecated stuff.

  4. jira-importer commented on Jan 7, 2025

    @jira-importer
    Author

    Guillaume Nodet commented

    Sylwester Lachiewicz you mean for plugins ?

    The rules are quite simple

    • the plugin can only depend on org.apache.maven:maven-api-* artifacts (no any other maven related artifacts) at compile time
    • avoid plexus artifacts at compile time
    • mojo annotations are now in org.apache.maven.api.plugin.annotations package
    • injection annotations come from org.apache.maven.api.di
    • replace MavenSession with org.apache.maven.api.Session, MavenProject with org.apache.maven.api.Project, classes from org.apache.maven.model with their counterparts from org.apache.maven.api.model
    • unit test needs JUnit 5 and need the org.apache.maven.api.plugin.testing
  5. jira-importer commented on Jan 7, 2025

    @jira-importer
    Author
  6. added
    priority:critical
    on Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

maintenancepriority:critical

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions