Skip to content

[Backport 4.0.x] Fix #12685: Add tests for war/ear plugin upgrades, extract Quarkus tests - #12876

Merged
gnodet merged 1 commit into
maven-4.0.xfrom
backport/12808-to-maven-4.0.x
Aug 28, 2026
Merged

[Backport 4.0.x] Fix #12685: Add tests for war/ear plugin upgrades, extract Quarkus tests#12876
gnodet merged 1 commit into
maven-4.0.xfrom
backport/12808-to-maven-4.0.x

Conversation

@gnodet

@gnodet gnodet commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport of #12808 to maven-4.0.x.

  • Adds unit tests for maven-war-plugin and maven-ear-plugin upgrade entries
  • Extracts Quarkus plugin tests to PluginUpgradeQuarkusTest.java to stay within the 2,000-line Checkstyle FileLength limit
  • Compacts the predefined plugin upgrades config test

All 52 tests pass on maven-4.0.x.

🤖 Generated with Claude Code

…des, extract Quarkus tests

* Fix #12685: Add maven-war-plugin and maven-ear-plugin to plugin upgrade list

Both plugins use reflection on java.util.Properties internals (via
XStream/plexus-archiver) in older versions, which is blocked by the
JDK 17+ module system. Since Maven 4 requires JDK 17+, mvnup should
upgrade these plugins to compatible versions (>= 3.4.0).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: trim test file to stay within 2000-line Checkstyle limit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: extract Quarkus plugin tests to separate file

Move the Quarkus-specific tests from PluginUpgradeStrategyTest to a new
PluginUpgradeQuarkusTest class to stay well within the 2000-line
Checkstyle limit and leave room for future plugin additions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added this to the 4.0.0-rc-7 milestone Aug 27, 2026

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, faithful backport of #12808 to maven-4.0.x. The diffs are byte-identical to the original (all added and removed lines match exactly, with only expected hunk-header line-number offsets differing). All 24 CI checks pass across Linux/macOS/Windows on JDK 17/21/25.

The PluginUpgradeQuarkusTest.java extraction correctly keeps the original test file under the 2,000-line Checkstyle FileLength limit. The predefined plugin upgrades config test was properly compacted from individual boolean variables to a loop, adding maven-war-plugin and maven-ear-plugin to the assertion list.

Minor style nit (carried over from original PR, not a backport issue): assertTrue(newProp == null, ...) is used in two places instead of the more idiomatic assertNull(newProp, ...).

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

@gnodet
gnodet merged commit a7b234b into maven-4.0.x Aug 28, 2026
24 checks passed
@gnodet
gnodet deleted the backport/12808-to-maven-4.0.x branch August 28, 2026 05:13
@github-actions

Copy link
Copy Markdown

@gnodet Please assign appropriate label to PR according to the type of change.

@gnodet gnodet added the bug Something isn't working label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant