Skip to content

Conversation

@timtebeek
Copy link
Member

@timtebeek timtebeek commented Feb 11, 2026

Summary

  • Add UpgradePluginsForJava25 recipe to upgrade Maven plugins and dependencies to Java 25 compatible versions
  • Wire the new recipe into the existing UpgradeToJava25 recipe

Problem

After migrating to Java 25, Maven plugins need to be at minimum compatible versions. The existing UpgradeToJava25 recipe handles code migrations and <release>25</release> but does not upgrade plugin versions, causing build failures.

Solution

New UpgradePluginsForJava25 declarative recipe that upgrades:

  • maven-compiler-plugin to 3.15.x (3.14.1 has known Java 25 issues)
  • maven-surefire-plugin to 3.1.x
  • maven-failsafe-plugin to 3.1.x
  • byte-buddy to 1.17.x (ASM 9.8 for Java 25 class files)
  • Gradle wrapper to 9.1 (first version with Java 25 support)

Follows the established pattern from UpgradePluginsForJava17 and UpgradePluginsForJava21.

Test plan

  • Existing tests pass

  • New test verifying plugin version upgrades

  • recipes.csv regenerated and validated

  • Fixes moderneinc/customer-requests#1819

  • Fixes moderneinc/customer-requests#1820

Tim te Beek added 2 commits February 11, 2026 23:34
@timtebeek timtebeek added recipe Recipe requested java 25+ labels Feb 11, 2026
@timtebeek timtebeek moved this from In Progress to Ready to Review in OpenRewrite Feb 11, 2026
.containsPattern("maven-compiler-plugin</artifactId>\\s*<version>3\\.15\\.")
.containsPattern("maven-surefire-plugin</artifactId>\\s*<version>3\\.")
.containsPattern("maven-failsafe-plugin</artifactId>\\s*<version>3\\.")
.actual())
Copy link
Contributor

Choose a reason for hiding this comment

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

Should byte-buddy show up in the test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since it's just a UpgradeDependencyVersion I think we have that sufficiently covered elsewhere. Thanks for the suggestions though!

@timtebeek timtebeek merged commit 0efab1c into main Feb 11, 2026
1 check passed
@timtebeek timtebeek deleted the timtebeek/java25-maven-plugins branch February 11, 2026 23:25
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java 25+ recipe Recipe requested

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants