Repository navigation
Remove AdoptOpenJDK and Adopt OpenJ9 distributions in v6 #1183
Description
Description:
Remove the legacy AdoptOpenJDK distributions from setup-java and document the required migration paths for users upgrading to v6:
adoptandadopt-hotspotshould be removed; users must migrate totemurin.adopt-openj9should be removed; users must migrate tosemeru/ IBM Semeru.
Investigation notes:
- Runtime support still exists in
src/distributions/distribution-factory.ts, whereJavaDistribution.Adopt,JavaDistribution.AdoptHotspot, andJavaDistribution.AdoptOpenJ9instantiateAdoptDistribution. - The legacy implementation lives under
src/distributions/adopt/and still querieshttps://api.adoptopenjdk.netas a fallback for HotSpot and directly for OpenJ9. src/distributions/package-types.tsstill exposes package capabilities foradopt,adopt-hotspot, andadopt-openj9.src/distributions/platform-types.tsstill exposes platform capabilities for all three Adopt variants.- Tests and fixtures still cover the legacy implementation, especially
__tests__/distributors/adopt-installer.test.ts,__tests__/data/adopt.json, and platform/package references in related tests. - Generated bundles in
dist/will need to be regenerated after source removal.
Documentation surfaces to update:
README.md- Remove
adopt,adopt-hotspot, andadopt-openj9from the supported distributions table. - Remove
adoptfrom the checksum verification list. - Replace the current note about AdoptOpenJDK migration with explicit v6 upgrade guidance.
- Add/adjust migration examples showing
adopt/adopt-hotspot->temurinandadopt-openj9->semeru.
- Remove
docs/advanced-usage.md- Remove the
Adoptsection from distribution examples and the table of contents. - Remove Adopt rows from package compatibility and platform compatibility tables.
- Update Java version file guidance so
.tool-versionsadoptopenjdkmappings are documented as compatibility/migration behavior, not as supported direct distribution values. - Replace examples that download from
github.com/AdoptOpenJDK/...with Temurin/Adoptium equivalents where appropriate.
- Remove the
- Historical ADR references in
docs/adrs/0000-v2-setup-java.mdcan remain if treated as history, but should not be used as current support documentation.
Behavior and compatibility considerations:
- Any direct reference to legacy Adopt distributions must be treated as an error, not a warning. Builds should fail fast before cache lookup or any vendor request.
distribution: adopt,distribution: adopt-hotspot, anddistribution: adopt-openj9must not be treated as aliases fortemurin,semeru, or any other distribution. Users must update the input explicitly.- The error message should point users to the required replacement distribution:
adopt/adopt-hotspot->temurin;adopt-openj9->semeru. - Users upgrading to v6 from older setup-java versions must update workflows before upgrading:
# AdoptOpenJDK HotSpot before
- uses: actions/setup-java@v5
with:
distribution: adopt
java-version: '17'
# v6+
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '17'# Adopt OpenJ9 before
- uses: actions/setup-java@v5
with:
distribution: adopt-openj9
java-version: '17'
# v6+
- uses: actions/setup-java@v6
with:
distribution: semeru
java-version: '17'.tool-versions/ asdf inputs currently mapadoptopenjdktotemurin, includingadoptopenjdk-openj9due to prefix collapsing. This compatibility behavior must be removed for v6: legacy Adopt vendor prefixes should not be silently remapped to supported distributions. They should produce a hard error that instructs users to choosetemurinorsemeruexplicitly.
Justification:
AdoptOpenJDK moved to Eclipse Temurin and the AdoptOpenJDK catalogs are no longer the supported path for receiving current software and security updates. Adopt OpenJ9 users should move to IBM Semeru, which is the maintained OpenJ9 successor path already supported by setup-java.
Removing these legacy distribution values in v6 avoids continuing to advertise obsolete distributions, reduces maintenance around archived endpoints, and gives users a clear upgrade path before they move from older setup-java versions to v6.
Are you willing to submit a PR?
Yes.
Activity
karianna commentedon Jul 30, 2026
Adoptium Working Group member here. I agree with this change. Whilst I appreciate that for historical / comparison or other legacy reasons folks may want to have access to old AdoptOpenJDK and AdoptOpenJDK J9 binaries, the reality is that they are unmaintained security risks going forward and we should not be offering them through GH Actions.
gdams commentedon Jul 31, 2026
Yeah I'm happy with this approach. I think it would be useful to add a deprecation notice ahead of v6 though and then perhaps a clear error in v6 telling users which new distribution to use.
brunoborges commentedon Jul 31, 2026
The v5 deprecation work is tracked in #1186. It preserves support for
adopt,adopt-hotspot, andadopt-openj9in setup-java v5 while adding runtime warnings and migration guidance ahead of their removal in v6.brunoborges commentedon Jul 31, 2026
The
releases/v4dependency audit failures are addressed by #1188. It clears all high and critical npm audit findings and restores the Basic validation checks across macOS, Ubuntu, and Windows.migrate to supported distribution
migrate to supported distribution