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

   ## Summary
   
   `mvnup apply`'s `DuplicateElementStrategy` incorrectly removes elements from 
plugin `<configuration>` sections, breaking builds of projects like Apache 
Accumulo.
   
   - The strategy deduplicates by **tag name only** — when it encounters 
multiple `<arg>` children inside `<compilerArgs>`, it keeps only the last one
   - In accumulo-access, this transforms `<arg>-Xlint:all</arg> 
<arg>-Xlint:-processing</arg> <arg>-Xmaxwarns</arg> <arg>5</arg>` into just 
`<arg>5</arg>`, causing `error: invalid flag: 5`
   - The fix stops deduplication at `<configuration>` boundaries — POM schema 
elements above it are still deduplicated, but free-form plugin XML below it is 
left untouched
   - This was the root cause of the accumulo, accumulo-access, and 
accumulo-classloaders failures in the 
[maven4-testing](https://github.com/gnodet/maven4-testing) compatibility suite 
for RC-6
   
   ## Reproduction
   
   ```bash
   # Clone accumulo-access, run mvnup apply with RC-6, then build:
   git clone https://github.com/apache/accumulo-access.git && cd accumulo-access
   mvnup apply   # removes 168 lines across 3 POMs, including compiler args
   mvn clean package -DskipTests
   # → error: invalid flag: 5  (on accumulo-access-test-data module)
   ```
   
   ## Test plan
   
   - [x] 6 new tests covering compilerArgs, exec arguments, checkstyle modules, 
RAT excludes, lifecycle-mapping pluginExecutions, and mixed POM-level + config 
scenarios
   - [x] All 268 existing mvnup strategy tests pass
   - [x] End-to-end verification: fixed `mvnup apply` on accumulo-access 
produces zero POM modifications and build succeeds
   
   🤖 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