GeezerVison is showing github.com — [MNG-8494] Restore Maven 3 compatibility · Issue #9943 · apache/maven
[MNG-8494] Restore Maven 3 compatibility #9943DescriptionGuillaume 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 Activityjira-importer commented on Jan 6, 2025 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? jira-importer commented on Jan 6, 2025 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... jira-importer commented on Jan 7, 2025 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. jira-importer commented on Jan 7, 2025 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
jira-importer commented on Jan 7, 2025
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|