Skip to content

Replace the retired adopt setup-java distribution with temurin in the Java 25 migration - #1253

Merged
jkschneider merged 1 commit into
java25/alternate-maven-java-versionfrom
java25/setup-java-temurin
Oct 3, 2026
Merged

jkschneider merged 1 commit into
java25/alternate-maven-java-versionfrom
java25/setup-java-temurin

Conversation

@jkschneider

Copy link
Copy Markdown
Member

AdoptOpenJDK is retired in favor of Eclipse Temurin and actions/setup-java marks distribution: adopt as deprecated. The migration raised java-version to 25 and left the distribution as it was. UpgradeToJava25 now runs the existing SetupJavaAdoptOpenJDKToTemurin before raising the version.

Found by a team of coding agents reviewing a Moderne run of org.openrewrite.java.migrate.UpgradeToJava25 over eight open-source repositories (run 20261003103223-WtyA8). The issue is setup-java-retired-distribution in the run's io.moderne.RecipeIssues data table, and the fix was discussed and reviewed on the run's message board. A row from the table, as a generalized example:

The migration retains retired AdoptOpenJDK rather than selecting its Temurin successor for Java 25. (spring-projects/spring-petclinic, .github/workflows/maven-build.yml)

Before:

steps:
  - uses: actions/setup-java@v4
    with:
      java-version: '17'
      distribution: adopt

What the recipe produced:

steps:
  - uses: actions/setup-java@v4
    with:
      java-version: '25'
      distribution: adopt

Expected:

steps:
  - uses: actions/setup-java@v4
    with:
      java-version: '25'
      distribution: temurin

Stacked on #1252 (4 of 9); merge that one first.

@jkschneider
jkschneider force-pushed the java25/setup-java-temurin branch from 16b8d7c to d2f5420 Compare October 3, 2026 15:51
@jkschneider
jkschneider merged commit 11d9500 into main Oct 3, 2026
1 check passed
@jkschneider
jkschneider deleted the java25/setup-java-temurin branch October 3, 2026 16:20
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