Skip to content

Fix #12087: add surefire and failsafe plugins to PluginUpgradeStrategy - #12089

Merged
gnodet merged 1 commit into
masterfrom
fix/12087-surefire-failsafe-upgrade
May 19, 2026
Merged

gnodet merged 1 commit into
masterfrom
fix/12087-surefire-failsafe-upgrade

Conversation

@gnodet

@gnodet gnodet commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add maven-surefire-plugin and maven-failsafe-plugin to the PluginUpgradeStrategy with minimum version 3.5.2 for Maven 4 compatibility
  • Older versions (e.g. 3.1.2) fail with IllegalStateException: No instance of Project is bound to the mojo execution scope under Maven 4
  • Add tests for both plugins

Test plan

  • Existing PluginUpgradeStrategyTest tests pass (23 tests)
  • New test: surefire 3.1.2 is upgraded to 3.5.2
  • New test: failsafe 3.1.2 is upgraded to 3.5.2
  • Existing test: predefined plugin upgrades list includes surefire and failsafe

Closes #12087

🤖 Generated with Claude Code

Claude Code on behalf of Guillaume Nodet

Older versions of maven-surefire-plugin and maven-failsafe-plugin
(e.g. 3.1.2) are incompatible with Maven 4, failing with
IllegalStateException in MojoExecutionScopeModule. Add both plugins
with minimum version 3.5.2 so mvnup upgrades them automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet
gnodet merged commit 4f3ee14 into master May 19, 2026
24 checks passed
@gnodet
gnodet deleted the fix/12087-surefire-failsafe-upgrade branch May 19, 2026 14:27
@github-actions github-actions Bot added this to the 4.1.0 milestone May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

gnodet added a commit that referenced this pull request May 19, 2026
…UpgradeStrategy (#12109)

* Fix #12087: add surefire and failsafe plugins to PluginUpgradeStrategy (#12089)

Older versions of maven-surefire-plugin and maven-failsafe-plugin
(e.g. 3.1.2) are incompatible with Maven 4, failing with
IllegalStateException in MojoExecutionScopeModule. Add both plugins
with minimum version 3.5.2 so mvnup upgrades them automatically.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Fix test compilation: use domtrip API instead of JDOM in PluginUpgradeStrategyTest

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

---------

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.

mvnup: add surefire and failsafe plugins to PluginUpgradeStrategy

2 participants