Skip to content

Commit 536de9e

Browse files
CopilotbrunoborgesCopilot
authored
Remove legacy Adopt distributions in v6 (#1185)
* Initial plan * Remove legacy Adopt distributions Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Bruno Borges <brborges@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 9a8c300 commit 536de9e

17 files changed

Lines changed: 51 additions & 2429 deletions

‎.github/workflows/e2e-cache.yml‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: ./
3535
id: setup-java
3636
with:
37-
distribution: 'adopt'
37+
distribution: 'temurin'
3838
java-version: '17'
3939
cache: gradle
4040
- name: Create files to cache
@@ -62,7 +62,7 @@ jobs:
6262
uses: ./
6363
id: setup-java
6464
with:
65-
distribution: 'adopt'
65+
distribution: 'temurin'
6666
java-version: '11'
6767
cache: gradle
6868
cache-read-only: true
@@ -85,7 +85,7 @@ jobs:
8585
uses: ./
8686
id: setup-java
8787
with:
88-
distribution: 'adopt'
88+
distribution: 'temurin'
8989
java-version: '11'
9090
cache: maven
9191
- name: Create files to cache
@@ -111,7 +111,7 @@ jobs:
111111
uses: ./
112112
id: setup-java
113113
with:
114-
distribution: 'adopt'
114+
distribution: 'temurin'
115115
java-version: '11'
116116
cache: maven
117117
cache-read-only: true
@@ -138,7 +138,7 @@ jobs:
138138
uses: ./
139139
id: setup-java
140140
with:
141-
distribution: 'adopt'
141+
distribution: 'temurin'
142142
java-version: '11'
143143
cache: sbt
144144
- name: Setup SBT
@@ -178,7 +178,7 @@ jobs:
178178
uses: ./
179179
id: setup-java
180180
with:
181-
distribution: 'adopt'
181+
distribution: 'temurin'
182182
java-version: '11'
183183
cache: sbt
184184
cache-read-only: true
@@ -207,7 +207,7 @@ jobs:
207207
uses: ./
208208
id: setup-java
209209
with:
210-
distribution: 'adopt'
210+
distribution: 'temurin'
211211
java-version: '17'
212212
cache: gradle
213213
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
@@ -236,7 +236,7 @@ jobs:
236236
uses: ./
237237
id: setup-java
238238
with:
239-
distribution: 'adopt'
239+
distribution: 'temurin'
240240
java-version: '11'
241241
cache: gradle
242242
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
@@ -260,7 +260,7 @@ jobs:
260260
uses: ./
261261
id: setup-java
262262
with:
263-
distribution: 'adopt'
263+
distribution: 'temurin'
264264
java-version: '11'
265265
cache: gradle
266266
cache-dependency-path: __tests__/cache/gradle2/*.gradle*
@@ -281,7 +281,7 @@ jobs:
281281
uses: ./
282282
id: setup-java
283283
with:
284-
distribution: 'adopt'
284+
distribution: 'temurin'
285285
java-version: '11'
286286
cache: maven
287287
cache-dependency-path: __tests__/cache/maven/pom.xml
@@ -308,7 +308,7 @@ jobs:
308308
uses: ./
309309
id: setup-java
310310
with:
311-
distribution: 'adopt'
311+
distribution: 'temurin'
312312
java-version: '11'
313313
cache: maven
314314
cache-dependency-path: __tests__/cache/maven/pom.xml
@@ -332,7 +332,7 @@ jobs:
332332
uses: ./
333333
id: setup-java
334334
with:
335-
distribution: 'adopt'
335+
distribution: 'temurin'
336336
java-version: '11'
337337
cache: maven
338338
cache-dependency-path: |
@@ -359,7 +359,7 @@ jobs:
359359
uses: ./
360360
id: setup-java
361361
with:
362-
distribution: 'adopt'
362+
distribution: 'temurin'
363363
java-version: '11'
364364
cache: sbt
365365
cache-dependency-path: __tests__/cache/sbt/*.sbt
@@ -400,7 +400,7 @@ jobs:
400400
uses: ./
401401
id: setup-java
402402
with:
403-
distribution: 'adopt'
403+
distribution: 'temurin'
404404
java-version: '11'
405405
cache: sbt
406406
cache-dependency-path: __tests__/cache/sbt/*.sbt
@@ -434,7 +434,7 @@ jobs:
434434
uses: ./
435435
id: setup-java
436436
with:
437-
distribution: 'adopt'
437+
distribution: 'temurin'
438438
java-version: '11'
439439
cache: sbt
440440
cache-dependency-path: __tests__/cache/sbt2/*.sbt
@@ -458,7 +458,7 @@ jobs:
458458
- name: Run setup-java with a custom Maven cache path
459459
uses: ./
460460
with:
461-
distribution: 'adopt'
461+
distribution: 'temurin'
462462
java-version: '11'
463463
cache: maven
464464
cache-dependency-path: |
@@ -483,7 +483,7 @@ jobs:
483483
- name: Run setup-java with a custom Maven cache path
484484
uses: ./
485485
with:
486-
distribution: 'adopt'
486+
distribution: 'temurin'
487487
java-version: '11'
488488
cache: maven
489489
cache-dependency-path: |

‎.github/workflows/e2e-local-file.yml‎

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,6 @@ permissions:
1515
contents: read
1616

1717
jobs:
18-
setup-java-local-file-adopt:
19-
name: Validate installation from local file Adopt
20-
runs-on: ${{ matrix.os }}
21-
strategy:
22-
fail-fast: false
23-
matrix:
24-
os: [macos-latest, windows-latest, ubuntu-latest]
25-
steps:
26-
- name: Checkout
27-
uses: actions/checkout@v7
28-
with:
29-
persist-credentials: false
30-
- name: Download Adopt OpenJDK file
31-
run: |
32-
if ($IsLinux) {
33-
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
34-
$localFilename = "java_package.tar.gz"
35-
} elseif ($IsMacOS) {
36-
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz"
37-
$localFilename = "java_package.tar.gz"
38-
} elseif ($IsWindows) {
39-
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_windows_hotspot_11.0.10_9.zip"
40-
$localFilename = "java_package.zip"
41-
}
42-
echo "LocalFilename=$localFilename" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
43-
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, "$env:RUNNER_TEMP/$localFilename")
44-
shell: pwsh
45-
- name: setup-java
46-
uses: ./
47-
id: setup-java
48-
with:
49-
distribution: 'jdkfile'
50-
jdk-file: ${{ runner.temp }}/${{ env.LocalFilename }}
51-
java-version: '11.0.0-ea'
52-
architecture: x64
53-
- name: Verify Java version
54-
env:
55-
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
56-
run: bash __tests__/verify-java.sh "11.0.10" "$JAVA_PATH"
57-
shell: bash
58-
5918
setup-java-local-file-zulu:
6019
name: Validate installation from local file Zulu
6120
runs-on: ${{ matrix.os }}

‎.github/workflows/e2e-publishing.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: ./
3636
id: setup-java
3737
with:
38-
distribution: 'adopt'
38+
distribution: 'temurin'
3939
java-version: '11'
4040
server-id: maven
4141
server-username-env-var: MAVEN_USERNAME
@@ -90,7 +90,7 @@ jobs:
9090
uses: ./
9191
id: setup-java
9292
with:
93-
distribution: 'adopt'
93+
distribution: 'temurin'
9494
java-version: '11'
9595
server-id: maven
9696
server-username-env-var: MAVEN_USERNAME
@@ -128,7 +128,7 @@ jobs:
128128
uses: ./
129129
id: setup-java
130130
with:
131-
distribution: 'adopt'
131+
distribution: 'temurin'
132132
java-version: '11'
133133
server-id: maven
134134
server-username-env-var: MAVEN_USERNAME
@@ -161,7 +161,7 @@ jobs:
161161
uses: ./
162162
id: setup-java
163163
with:
164-
distribution: 'adopt'
164+
distribution: 'temurin'
165165
java-version: '11'
166166
server-id: maven
167167
server-username-env-var: MAVEN_USERNAME

‎.github/workflows/e2e-versions.yml‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [macos-15-intel, windows-latest, ubuntu-latest]
24-
distribution: [
24+
distribution:
25+
[
2526
'temurin',
26-
'adopt',
27-
'adopt-openj9',
2827
'zulu',
2928
'liberica',
3029
'microsoft',
@@ -35,7 +34,7 @@ jobs:
3534
'jetbrains',
3635
'kona',
3736
'liberica-nik'
38-
] # internally 'adopt-hotspot' is the same as 'adopt'
37+
]
3938
version: ['21', '11', '17']
4039
exclude:
4140
- distribution: microsoft
@@ -581,11 +580,8 @@ jobs:
581580
fail-fast: false
582581
matrix:
583582
os: *default_os
584-
distribution: ['adopt', 'adopt-openj9', 'zulu']
583+
distribution: ['temurin', 'zulu']
585584
java-version-file: ['.java-version', '.tool-versions']
586-
exclude:
587-
- os: macos-latest
588-
distribution: adopt-openj9
589585
steps:
590586
- *checkout_step
591587
- name: Create .java-version file
@@ -613,7 +609,7 @@ jobs:
613609
fail-fast: false
614610
matrix:
615611
os: *default_os
616-
distribution: ['adopt', 'zulu', 'liberica']
612+
distribution: ['temurin', 'zulu', 'liberica']
617613
java-version-file: ['.java-version', '.tool-versions', '.sdkmanrc']
618614
steps:
619615
- *checkout_step

‎README.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ This action allows you to work with Java and Scala projects.
3333

3434
See [GPG](docs/advanced-usage.md#gpg) for details.
3535

36+
- **Legacy AdoptOpenJDK distributions were removed.** Replace `adopt` or `adopt-hotspot` with `temurin`, and replace `adopt-openj9` with `semeru`.
37+
3638
## Breaking changes in V5
3739

3840
- Upgraded action from node20 to node24
@@ -101,7 +103,7 @@ For more details, see the full release notes on the [releases page](https://git
101103

102104
### Download integrity verification
103105

104-
When a selected distribution publishes an authoritative checksum for an archive, `setup-java` automatically verifies each downloaded JDK, JRE, or JMOD archive before extraction and caching. No input is required. Automatic checksum verification is currently available for `temurin`, `semeru`, `adopt`, `corretto`, `dragonwell`, `kona`, `sapmachine`, `graalvm`, `graalvm-community`, `zulu`, `oracle`, `oracle-openjdk`, `microsoft`, and `jetbrains`.
106+
When a selected distribution publishes an authoritative checksum for an archive, `setup-java` automatically verifies each downloaded JDK, JRE, or JMOD archive before extraction and caching. No input is required. Automatic checksum verification is currently available for `temurin`, `semeru`, `corretto`, `dragonwell`, `kona`, `sapmachine`, `graalvm`, `graalvm-community`, `zulu`, `oracle`, `oracle-openjdk`, `microsoft`, and `jetbrains`.
105107

106108
Distributions or individual releases without an authoritative checksum continue to install normally, with the omission reported only in debug logs. Archives resolved directly from the runner tool cache are not downloaded again and therefore are not reverified.
107109

@@ -152,8 +154,6 @@ Currently, the following distributions are supported:
152154
|-|-|-|
153155
| `temurin` | [Eclipse Temurin](https://adoptium.net/) | [`temurin` license](https://adoptium.net/about.html)
154156
| `zulu` | [Azul Zulu OpenJDK](https://www.azul.com/downloads/zulu-community/?package=jdk) | [`zulu` license](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) |
155-
| `adopt` or `adopt-hotspot` | [AdoptOpenJDK Hotspot](https://adoptopenjdk.net/) | [`adopt-hotspot` license](https://adoptopenjdk.net/about.html) |
156-
| `adopt-openj9` | [AdoptOpenJDK OpenJ9](https://adoptopenjdk.net/) | [`adopt-openj9` license](https://adoptopenjdk.net/about.html) |
157157
| `liberica` | [Liberica JDK](https://bell-sw.com/) | [`liberica` license](https://bell-sw.com/liberica_eula/) |
158158
| `liberica-nik` | [Liberica Native Image Kit](https://bell-sw.com/pages/downloads/native-image-kit/) | [`liberica-nik` license](https://bell-sw.com/liberica_nik_eula/) |
159159
| `microsoft` | [Microsoft Build of OpenJDK](https://www.microsoft.com/openjdk) | [`microsoft` license](https://docs.microsoft.com/java/openjdk/faq)
@@ -171,7 +171,6 @@ Currently, the following distributions are supported:
171171

172172
> [!NOTE]
173173
> - The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions.
174-
> - AdoptOpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` and `adopt-openj9`, to `temurin` and `semeru` respectively, to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/).
175174
> - Oracle OpenJDK builds are created and hosted by Oracle. After a limited number of releases, Oracle archives these builds and no longer provides security updates. To continue receiving security patches, users must move to Oracle JDK or choose a different vendor.
176175
> - For Azul Zulu OpenJDK, architecture `arm64` is mapped to `aarch64` when querying the Azul Metadata API.
177176
> - To comply with the GraalVM Free Terms and Conditions (GFTC) license, it is recommended to use GraalVM JDK 17 version 17.0.12, as this is the only version of GraalVM JDK 17 available under the GFTC license. Additionally, it is encouraged to consider upgrading to GraalVM JDK 21, which offers the latest features and improvements.

0 commit comments

Comments
 (0)