Skip to content

Upgrade an existing Maven wrapper to 3.9.x alongside the Java 17 plugin upgrades - #1261

Merged
jkschneider merged 1 commit into
boot4/mapstruct-jdk8from
boot4/maven-wrapper-3-9
Oct 3, 2026
Merged

jkschneider merged 1 commit into
boot4/mapstruct-jdk8from
boot4/maven-wrapper-3-9

Conversation

@jkschneider

Copy link
Copy Markdown
Member

The Java 17 migration upgrades maven-compiler-plugin to 3.16, which needs a newer Maven than the 3.5.0 wrapper some projects still carry. The migration now runs UpdateMavenWrapper to 3.9.x, only where a wrapper already exists.

Found by a team of coding agents reviewing a Moderne run of org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0 over the 31 JHipster repositories (run 20261003115037-NUeOz). The issue is maven-wrapper-too-old-for-compiler in the run's io.moderne.RecipeIssues data table (2 rows), and the fix was discussed and reviewed on the run's message board. A row from the table, as a generalized example:

The Maven wrapper remains older than the minimum required by the upgraded compiler plugin. (jhipster/jhipster-sample-app-ng1, .mvn/wrapper/maven-wrapper.properties, recipe org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0)

Before:

# .mvn/wrapper/maven-wrapper.properties
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.7.0</version></plugin>

What the recipe produced:

# .mvn/wrapper/maven-wrapper.properties
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.16.0</version></plugin>

Expected:

# .mvn/wrapper/maven-wrapper.properties
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.16.0</version></plugin>

Stacked on #1260 (2 of 3); merge that one first.

@jkschneider
jkschneider added this pull request to stack #1263 October 3, 2026 21:29
@jkschneider
jkschneider merged commit 1782adc into main Oct 3, 2026
1 check passed
@jkschneider
jkschneider deleted the boot4/maven-wrapper-3-9 branch October 3, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant