Skip to content

Remove invalid combine.self and combine.children attributes in mvnup#12160

Open
gnodet wants to merge 1 commit into
apache:masterfrom
gnodet:cooperative-amp
Open

Remove invalid combine.self and combine.children attributes in mvnup#12160
gnodet wants to merge 1 commit into
apache:masterfrom
gnodet:cooperative-amp

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 26, 2026

Summary

  • Remove invalid combine.self and combine.children attribute values entirely instead of converting them to merge, since Maven 3 silently ignored invalid values — removing preserves actual Maven 3 behavior
  • Detect any invalid value against the full set of valid values (combine.self: override/merge/remove; combine.children: append/merge), not just specific ones like append or override
  • Collect matching elements to a list before mutating, replacing the .peek().count() pattern which could miss occurrences

Test plan

  • Added tests for removing combine.self="append" and arbitrary invalid values
  • Added tests for removing combine.children="override" and arbitrary invalid values
  • Added tests verifying valid values (override, merge, remove for self; append, merge for children) are preserved
  • Added tests for invalid attributes in profile plugin configurations
  • Added tests for all occurrences across pluginManagement, plugins, and profiles
  • All 31 CompatibilityFixStrategyTest tests pass

🤖 Generated with Claude Code

…f converting them

Maven 3 silently ignored invalid combine.self and combine.children
attribute values, so removing them entirely preserves actual Maven 3
behavior. Previously mvnup converted specific invalid values (e.g.
combine.self="append" → "merge"), which could miss other invalid values
and subtly changed semantics. Now both fixers detect any invalid value
against the full set of valid values (combine.self: override/merge/remove;
combine.children: append/merge), remove the attribute, and collect to a
list before mutating to avoid potential stream processing issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant