gnodet opened a new issue, #12530:
URL: https://github.com/apache/maven/issues/12530

   ## Description
   
   The [Maven 4 compatibility 
testing](https://github.com/gnodet/maven4-testing/issues/30310) across 966 
Apache projects reveals several categories of known issues that could be 
automatically fixed by [mvnup](https://github.com/apache/maven-mvnup). Adding 
these as mvnup upgrade strategies would significantly reduce the number of 
projects that fail under Maven 4.
   
   ## Proposed mvnup Strategies
   
   ### Plugin version upgrades (straightforward)
   
   | Known Issue | Fix | Details |
   |-------------|-----|---------|
   | `scala-maven-plugin#911` | Upgrade `net.alchim31.maven:scala-maven-plugin` 
to ≥ 4.9.5 | Older versions call `add()` on immutable lists returned by Maven 4 
API |
   | `beta-plugin-api-break` | Upgrade plugins pinned at `4.0.0-beta-1` | Beta 
API methods were renamed/removed before RC |
   | `ancient-enforcer-plugin` | Upgrade `maven-enforcer-plugin` to ≥ 3.0.0 | 
Older versions use removed `PluginParameterExpressionEvaluator` constructor |
   | `exec-plugin-getcontainer` | Upgrade `exec-maven-plugin` to ≥ 3.2.0 | 
Older versions call `MavenSession.getContainer()` which returns null in Maven 4 
|
   | `old-compiler-plugin-errorprone` | Upgrade `maven-compiler-plugin` to ≥ 
3.11 | Older versions can't find ErrorProne plug-in under Maven 4 classloading |
   
   ### Plugin migration (groupId change)
   
   | Known Issue | Fix | Details |
   |-------------|-----|---------|
   | `old-scala-tools-plugin` | Migrate `org.scala-tools:maven-scala-plugin` → 
`net.alchim31.maven:scala-maven-plugin` | Ancient plugin (unmaintained since 
2011) calls `add()` on immutable lists |
   
   ### POM fixes
   
   | Known Issue | Fix | Details |
   |-------------|-----|---------|
   | `duplicated-pom-tag` | Remove duplicate XML elements (`<artifactId>`, 
`<properties>`, etc.) | Maven 4's stricter POM parser rejects duplicates that 
Maven 3 silently accepted |
   | `duplicate-dependency-declarations` | Remove duplicate `<dependency>` 
declarations (same groupId:artifactId) | Maven 4's stricter validation rejects 
what Maven 3 silently merged |
   
   ## Impact
   
   These 8 strategies would address **8 of 27 known issues** in the 
[maven4-testing 
known-issues.json](https://github.com/gnodet/maven4-testing/blob/main/.github/known-issues.json),
 covering projects like:
   
   - All projects using old scala-maven-plugin or org.scala-tools
   - Projects with enforcer plugin < 3.0.0
   - Projects with exec-maven-plugin < 3.2.0
   - Projects with compiler plugin < 3.11
   - Projects with duplicate POM elements or dependency declarations
   
   ## Reference
   
   - Full test run: https://github.com/gnodet/maven4-testing/issues/30310
   - Known issues file: 
https://github.com/gnodet/maven4-testing/blob/main/.github/known-issues.json
   - mvnup repo: https://github.com/apache/maven-mvnup


-- 
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]

Reply via email to