You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/07/29 10:01:41 UTC
[PR] mvnup: skip dedup inside plugin elements [maven]
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] mvnup: skip dedup inside plugin elements [maven]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12582:
URL: https://github.com/apache/maven/pull/12582#issuecomment-5119990952
@gnodet Please assign appropriate label to PR according to the type of change.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] mvnup: skip dedup inside plugin elements [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #12582:
URL: https://github.com/apache/maven/pull/12582
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org