gnodet opened a new pull request, #12532:
URL: https://github.com/apache/maven/pull/12532

   ## Summary
   
   Adds 4 new mvnup upgrade strategies to address Maven 4 known compatibility 
issues from the 
[maven4-testing](https://github.com/gnodet/maven4-testing/blob/main/.github/known-issues.json)
 project:
   
   - **`old-compiler-plugin-errorprone`**: Update `maven-compiler-plugin` 
minimum to `3.11.0` (older versions can't find ErrorProne plug-in under Maven 4 
classloading)
   - **`beta-plugin-api-break`**: Detect and upgrade Maven 4 pre-release plugin 
versions (`4.0.0-beta-1`, `4.0.0-alpha-*`, etc.) that use API methods 
renamed/removed before RC
   - **`old-scala-tools-plugin`**: Migrate `org.scala-tools:maven-scala-plugin` 
→ `net.alchim31.maven:scala-maven-plugin:4.9.5` (unmaintained since 2011)
   - **`duplicated-pom-tag`**: New `DuplicateElementStrategy` that removes 
duplicate XML elements (`<artifactId>`, `<properties>`, etc.) that Maven 4's 
stricter POM parser rejects
   
   The remaining 4 strategies from the issue already existed:
   - `scala-maven-plugin#911` → already in `PLUGIN_UPGRADES` at 4.9.5
   - `ancient-enforcer-plugin` → already in `PLUGIN_UPGRADES` at 3.5.0
   - `exec-plugin-getcontainer` → already in `PLUGIN_UPGRADES` at 3.5.0
   - `duplicate-dependency-declarations` → already in 
`DeduplicateDependenciesStrategy`
   
   ### Changes
   
   | File | Change |
   |------|--------|
   | `PluginUpgradeStrategy.java` | Updated compiler min to 3.11.0, added 
`isMaven4PreRelease()` detection, added `PluginMigration` support with 
`migratePlugin()` method |
   | `PluginMigration.java` | New record for plugin groupId/artifactId 
migrations |
   | `DuplicateElementStrategy.java` | New strategy (priority 21) that 
recursively removes duplicate XML elements using last-wins semantics, skipping 
list containers |
   | `PluginUpgradeStrategyTest.java` | 13 new tests: 9 for pre-release 
detection, 4 for plugin migration |
   | `DuplicateElementStrategyTest.java` | 18 new tests covering applicability, 
element removal, nesting, list container skipping |
   
   ## Test plan
   
   - [x] All 476 mvnup tests pass (0 failures)
   - [x] Format check passes (`-Psourcecheck validate`)
   - [ ] CI build passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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