From 1352315f407858c62883eca996ec6edc7f0d1196 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Wed, 12 Jun 2024 11:27:32 +0200 Subject: [PATCH 1/5] Add new `ea,stable,...` alias Closes #82 --- jdk.java.net-uri.properties | 11 +++++------ src/ListOpenJavaDevelopmentKits.java | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/jdk.java.net-uri.properties b/jdk.java.net-uri.properties index 916c067..91d5f3d 100644 --- a/jdk.java.net-uri.properties +++ b/jdk.java.net-uri.properties @@ -20,12 +20,6 @@ ga,latest,macos,aarch64=https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb ga,latest,macos,x64=https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_macos-x64_bin.tar.gz ga,latest,windows,x64=https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_windows-x64_bin.zip # -# Soon-Archived Release -# -# -# Soon-Archived Release (Alias) -# -# # Early-Access Releases # 20,20-valhalla+20-75,linux,aarch64=https://download.java.net/java/early_access/valhalla/20/openjdk-20-valhalla+20-75_linux-aarch64_bin.tar.gz @@ -70,6 +64,11 @@ ea,latest,linux,x64=https://download.java.net/java/early_access/jdk24/1/GPL/open ea,latest,macos,aarch64=https://download.java.net/java/early_access/jdk24/1/GPL/openjdk-24-ea+1_macos-aarch64_bin.tar.gz ea,latest,macos,x64=https://download.java.net/java/early_access/jdk24/1/GPL/openjdk-24-ea+1_macos-x64_bin.tar.gz ea,latest,windows,x64=https://download.java.net/java/early_access/jdk24/1/GPL/openjdk-24-ea+1_windows-x64_bin.zip +ea,stable,linux,aarch64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_linux-aarch64_bin.tar.gz +ea,stable,linux,x64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_linux-x64_bin.tar.gz +ea,stable,macos,aarch64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_macos-aarch64_bin.tar.gz +ea,stable,macos,x64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_macos-x64_bin.tar.gz +ea,stable,windows,x64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_windows-x64_bin.zip jextract,latest,linux,x64=https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_linux-x64_bin.tar.gz jextract,latest,macos,aarch64=https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_macos-aarch64_bin.tar.gz jextract,latest,macos,x64=https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_macos-x64_bin.tar.gz diff --git a/src/ListOpenJavaDevelopmentKits.java b/src/ListOpenJavaDevelopmentKits.java index 1155dcd..e028aae 100644 --- a/src/ListOpenJavaDevelopmentKits.java +++ b/src/ListOpenJavaDevelopmentKits.java @@ -47,6 +47,9 @@ class ListOpenJavaDevelopmentKits { /** Early-Access Releases, as comma separated names. */ static final String EA = System.getProperty("EA", "24,23,jextract,loom,valhalla"); + /** Current "stable" Early-Access Release number. */ + static final String EA_STABLE = "23"; + /** Include archived releases flag. */ static final boolean ARCHIVES = Boolean.getBoolean("ARCHIVES"); @@ -137,12 +140,18 @@ static List generateEarlyAccessAliasKeys(String[] components) { var from = version.indexOf('-'); var till = version.indexOf('+'); var project = from >= 0 && from < till ? version.substring(from + 1, till) : version; + if (project.equals("ea")) { + components[0] = release; + components[1] = "latest"; + var aliasWithReleaseFeatureNumber = String.join(",", components); + components[0] = "ea"; + components[1] = release.equals(EA_STABLE) ? "stable" : "latest"; + var aliasWithEarlyAccessTag = String.join(",", components); + return List.of(aliasWithReleaseFeatureNumber, aliasWithEarlyAccessTag); + } components[0] = project; components[1] = "latest"; - var alias = String.join(",", components); - if (!project.equals("ea")) return List.of(alias); - components[0] = release; // 18-latest-... - return List.of(alias, String.join(",", components)); + return List.of(String.join(",", components)); } catch (IndexOutOfBoundsException exception) { System.err.println("Early-Access version without `-` and `+`: " + version); return List.of(); From b7605f74d9c8a8dc0c5d94a921e1c14ae4dbbff2 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Fri, 14 Jun 2024 08:12:08 +0200 Subject: [PATCH 2/5] Revert changes to generated file --- jdk.java.net-uri.properties | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jdk.java.net-uri.properties b/jdk.java.net-uri.properties index 91d5f3d..916c067 100644 --- a/jdk.java.net-uri.properties +++ b/jdk.java.net-uri.properties @@ -20,6 +20,12 @@ ga,latest,macos,aarch64=https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb ga,latest,macos,x64=https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_macos-x64_bin.tar.gz ga,latest,windows,x64=https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_windows-x64_bin.zip # +# Soon-Archived Release +# +# +# Soon-Archived Release (Alias) +# +# # Early-Access Releases # 20,20-valhalla+20-75,linux,aarch64=https://download.java.net/java/early_access/valhalla/20/openjdk-20-valhalla+20-75_linux-aarch64_bin.tar.gz @@ -64,11 +70,6 @@ ea,latest,linux,x64=https://download.java.net/java/early_access/jdk24/1/GPL/open ea,latest,macos,aarch64=https://download.java.net/java/early_access/jdk24/1/GPL/openjdk-24-ea+1_macos-aarch64_bin.tar.gz ea,latest,macos,x64=https://download.java.net/java/early_access/jdk24/1/GPL/openjdk-24-ea+1_macos-x64_bin.tar.gz ea,latest,windows,x64=https://download.java.net/java/early_access/jdk24/1/GPL/openjdk-24-ea+1_windows-x64_bin.zip -ea,stable,linux,aarch64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_linux-aarch64_bin.tar.gz -ea,stable,linux,x64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_linux-x64_bin.tar.gz -ea,stable,macos,aarch64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_macos-aarch64_bin.tar.gz -ea,stable,macos,x64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_macos-x64_bin.tar.gz -ea,stable,windows,x64=https://download.java.net/java/early_access/jdk23/26/GPL/openjdk-23-ea+26_windows-x64_bin.zip jextract,latest,linux,x64=https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_linux-x64_bin.tar.gz jextract,latest,macos,aarch64=https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_macos-aarch64_bin.tar.gz jextract,latest,macos,x64=https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_macos-x64_bin.tar.gz From 5696919e7a6d48917499b31ef73ba7d61e8ffbe3 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Fri, 14 Jun 2024 08:27:56 +0200 Subject: [PATCH 3/5] Flatten logic --- src/ListOpenJavaDevelopmentKits.java | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/ListOpenJavaDevelopmentKits.java b/src/ListOpenJavaDevelopmentKits.java index e028aae..8d5d34b 100644 --- a/src/ListOpenJavaDevelopmentKits.java +++ b/src/ListOpenJavaDevelopmentKits.java @@ -140,18 +140,16 @@ static List generateEarlyAccessAliasKeys(String[] components) { var from = version.indexOf('-'); var till = version.indexOf('+'); var project = from >= 0 && from < till ? version.substring(from + 1, till) : version; - if (project.equals("ea")) { - components[0] = release; - components[1] = "latest"; - var aliasWithReleaseFeatureNumber = String.join(",", components); - components[0] = "ea"; - components[1] = release.equals(EA_STABLE) ? "stable" : "latest"; - var aliasWithEarlyAccessTag = String.join(",", components); - return List.of(aliasWithReleaseFeatureNumber, aliasWithEarlyAccessTag); - } - components[0] = project; + components[0] = project; // "ea", "loom", ... + components[1] = "latest"; + if (!project.equals("ea")) return List.of(String.join(",", components)); + components[0] = "ea"; + components[1] = release.equals(EA_STABLE) ? "stable" : "latest"; + var aliasWithEarlyAccessMode = String.join(",", components); + components[0] = release; // "23", "24", ... components[1] = "latest"; - return List.of(String.join(",", components)); + var aliasWithReleaseFeatureNumber = String.join(",", components); + return List.of(aliasWithReleaseFeatureNumber, aliasWithEarlyAccessMode); } catch (IndexOutOfBoundsException exception) { System.err.println("Early-Access version without `-` and `+`: " + version); return List.of(); From 5a97dda2ee79100aa0f0c0bfd45d26b79638ace9 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Fri, 14 Jun 2024 09:24:16 +0200 Subject: [PATCH 4/5] Fix alias computation for early-access builds --- src/ListOpenJavaDevelopmentKits.java | 35 +++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/ListOpenJavaDevelopmentKits.java b/src/ListOpenJavaDevelopmentKits.java index 8d5d34b..03c7af3 100644 --- a/src/ListOpenJavaDevelopmentKits.java +++ b/src/ListOpenJavaDevelopmentKits.java @@ -9,6 +9,7 @@ import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; +import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; import java.util.TreeMap; @@ -31,7 +32,7 @@ * *
    *
  • {@code RELEASE}: Either a release number or a name of an early-access project - *
  • {@code VERSION}: Either a specific version or `latest` + *
  • {@code VERSION}: Either a specific version or `latest` or `stable` *
  • {@code OS-NAME}: An operating system name, usually one of: `linux`, `macos`, `windows` *
  • {@code OS-ARCH}: An operating system architecture, like: `aarch64`, `x64`, or `x64-musl` *
@@ -47,8 +48,11 @@ class ListOpenJavaDevelopmentKits { /** Early-Access Releases, as comma separated names. */ static final String EA = System.getProperty("EA", "24,23,jextract,loom,valhalla"); + /** Current "latest" Early-Access Release number. */ + static final String EA_LATEST = System.getProperty("EA_LATEST", "24"); + /** Current "stable" Early-Access Release number. */ - static final String EA_STABLE = "23"; + static final String EA_STABLE = System.getProperty("EA_STABLE", "23"); /** Include archived releases flag. */ static final boolean ARCHIVES = Boolean.getBoolean("ARCHIVES"); @@ -140,16 +144,25 @@ static List generateEarlyAccessAliasKeys(String[] components) { var from = version.indexOf('-'); var till = version.indexOf('+'); var project = from >= 0 && from < till ? version.substring(from + 1, till) : version; - components[0] = project; // "ea", "loom", ... - components[1] = "latest"; - if (!project.equals("ea")) return List.of(String.join(",", components)); - components[0] = "ea"; - components[1] = release.equals(EA_STABLE) ? "stable" : "latest"; - var aliasWithEarlyAccessMode = String.join(",", components); - components[0] = release; // "23", "24", ... + if (project.equals("ea")) { + var earlyAccessAliases = new ArrayList(); + components[0] = release; // "23", "24", ... + components[1] = "latest"; + earlyAccessAliases.add(String.join(",", components)); + components[0] = "ea"; + if (release.equals(EA_LATEST)) { + components[1] = "latest"; + earlyAccessAliases.add(String.join(",", components)); + } + if (release.equals(EA_STABLE)) { + components[1] = "stable"; + earlyAccessAliases.add(String.join(",", components)); + } + return earlyAccessAliases; + } + components[0] = project; // "loom", "valhalla", ... components[1] = "latest"; - var aliasWithReleaseFeatureNumber = String.join(",", components); - return List.of(aliasWithReleaseFeatureNumber, aliasWithEarlyAccessMode); + return List.of(String.join(",", components)); } catch (IndexOutOfBoundsException exception) { System.err.println("Early-Access version without `-` and `+`: " + version); return List.of(); From 5fcb9fd215a72fab1270c55a19cf29b0c8d61321 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Fri, 14 Jun 2024 09:50:16 +0200 Subject: [PATCH 5/5] Update documentation --- CHANGELOG.md | 3 +++ README.md | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c72723..6615fa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ This project uses tags and branches for [release management](https://docs.github ## [Unreleased] +### Added +- Java `23` and `24` to the list of Early-Access releases +- New `version: stable` mode for `release: ea` setups ## [1.3.4] - 2024-03-21 ### Fixed diff --git a/README.md b/README.md index 69685d1..aef07be 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,9 @@ It is set by default to `latest`. ___ -**WARNING!** - -Older versions of the JDK are provided to help developers debug issues in older systems. -**They are not updated with the latest security patches and are not recommended for use in production.** +> [!CAUTION] +> Older versions of the JDK are provided to help developers debug issues in older systems. +> **They are not updated with the latest security patches and are not recommended for use in production.** ___ @@ -111,10 +110,9 @@ steps: ``` ___ -**WARNING!** - -Older versions of the JDK are provided to help developers debug issues in older systems. -**They are not updated with the latest security patches and are not recommended for use in production.** +> [!CAUTION] +> Older versions of the JDK are provided to help developers debug issues in older systems. +> **They are not updated with the latest security patches and are not recommended for use in production.** ___ @@ -133,6 +131,11 @@ steps: release: N # Replace N with GA, EA, 17, 18, 19, ... ``` +> [!NOTE] +> This action supports two `version` update early-access modes for `release: EA` on `jdk.java.net`: +> - `version: latest` updates as early as possible to the latest-and-greatest JDK build (default) +> - `version: stable` updates later in the release cycle, usually then a new JDK build goes GA + ### Download and install an Early-Access build of a named OpenJDK project ```yaml