diff --git a/README.md b/README.md index 96b92b6c..89d77446 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ Currently, the following distributions are supported: | `corretto` | [Amazon Corretto Build of OpenJDK](https://aws.amazon.com/corretto/) | [`corretto` license](https://aws.amazon.com/corretto/faqs/) | `semeru` | [IBM Semeru Runtime Open Edition](https://developer.ibm.com/languages/java/semeru-runtimes/downloads/) | [`semeru` license](https://openjdk.java.net/legal/gplv2+ce.html) | | `oracle` | [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) | [`oracle` license](https://java.com/freeuselicense) -| `openjdk` | [OpenJDK](https://jdk.java.net/) | [`openjdk` license](https://openjdk.org/legal/gplv2+ce.html) +| `oracle-openjdk` | [Oracle OpenJDK](https://jdk.java.net/) | [`oracle-openjdk` license](https://openjdk.org/legal/gplv2+ce.html) | `dragonwell` | [Alibaba Dragonwell JDK](https://dragonwell-jdk.io/) | [`dragonwell` license](https://www.aliyun.com/product/dragonwell/) | `sapmachine` | [SAP SapMachine JDK/JRE](https://sapmachine.io/) | [`sapmachine` license](https://github.com/SAP/SapMachine/blob/sapmachine/LICENSE) | `graalvm` | [Oracle GraalVM](https://www.graalvm.org/) | [`graalvm` license](https://www.oracle.com/downloads/licenses/graal-free-license.html) @@ -160,6 +160,7 @@ Currently, the following distributions are supported: > [!NOTE] > - 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. > - 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/). +> - Oracle OpenJDK builds are created and hosted by Oracle under GPLv2+CE. 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. > - For Azul Zulu OpenJDK, architecture `arm64` is mapped to `aarch64` when querying the Azul Metadata API. > - 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. > - GraalVM Community is available as `distribution: 'graalvm-community'` for stable JDK 17 and later releases published on GitHub. diff --git a/__tests__/distributors/openjdk-installer.test.ts b/__tests__/distributors/openjdk-installer.test.ts index 7abf64ed..dfd3f865 100644 --- a/__tests__/distributors/openjdk-installer.test.ts +++ b/__tests__/distributors/openjdk-installer.test.ts @@ -148,13 +148,13 @@ describe('OpenJdkDistribution', () => { await expect( createDistribution()['findPackageForDownload']('24') ).rejects.toThrow( - "No matching version found for SemVer '24'.\nDistribution: OpenJDK" + "No matching version found for SemVer '24'.\nDistribution: Oracle OpenJDK" ); }); it.each([ - ['jre', 'OpenJDK provides only the `jdk` package type'], - ['jdk+fx', 'OpenJDK provides only the `jdk` package type'] + ['jre', 'Oracle OpenJDK provides only the `jdk` package type'], + ['jdk+fx', 'Oracle OpenJDK provides only the `jdk` package type'] ])('rejects the %s package type', async (packageType, message) => { await expect( createDistribution('26', 'x64', packageType)['findPackageForDownload']( @@ -199,7 +199,7 @@ describe('OpenJdkDistribution', () => { }); it('is registered in the distribution factory', () => { - const distribution = getJavaDistribution('openjdk', { + const distribution = getJavaDistribution('oracle-openjdk', { version: '26', architecture: 'x64', packageType: 'jdk', diff --git a/dist/setup/index.js b/dist/setup/index.js index fa43d043..d311f7fe 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -131893,11 +131893,11 @@ class KonaDistribution extends JavaBase { const OPENJDK_BASE_URL = 'https://jdk.java.net'; class OpenJdkDistribution extends JavaBase { constructor(installerOptions) { - super('OpenJDK', installerOptions); + super('Oracle OpenJDK', installerOptions); } async findPackageForDownload(range) { if (this.packageType !== 'jdk') { - throw new Error('OpenJDK provides only the `jdk` package type'); + throw new Error('Oracle OpenJDK provides only the `jdk` package type'); } const arch = this.distributionArchitecture(); if (!['x64', 'aarch64'].includes(arch)) { @@ -132022,7 +132022,7 @@ var JavaDistribution; JavaDistribution["GraalVMCommunity"] = "graalvm-community"; JavaDistribution["JetBrains"] = "jetbrains"; JavaDistribution["Kona"] = "kona"; - JavaDistribution["OpenJdk"] = "openjdk"; + JavaDistribution["OracleOpenJdk"] = "oracle-openjdk"; })(JavaDistribution || (JavaDistribution = {})); function getJavaDistribution(distributionName, installerOptions, jdkFile) { switch (distributionName) { @@ -132061,7 +132061,7 @@ function getJavaDistribution(distributionName, installerOptions, jdkFile) { return new JetBrainsDistribution(installerOptions); case JavaDistribution.Kona: return new KonaDistribution(installerOptions); - case JavaDistribution.OpenJdk: + case JavaDistribution.OracleOpenJdk: return new OpenJdkDistribution(installerOptions); default: return null; diff --git a/src/distributions/distribution-factory.ts b/src/distributions/distribution-factory.ts index fe53b2e9..d27844ee 100644 --- a/src/distributions/distribution-factory.ts +++ b/src/distributions/distribution-factory.ts @@ -42,7 +42,7 @@ enum JavaDistribution { GraalVMCommunity = 'graalvm-community', JetBrains = 'jetbrains', Kona = 'kona', - OpenJdk = 'openjdk' + OracleOpenJdk = 'oracle-openjdk' } export function getJavaDistribution( @@ -95,7 +95,7 @@ export function getJavaDistribution( return new JetBrainsDistribution(installerOptions); case JavaDistribution.Kona: return new KonaDistribution(installerOptions); - case JavaDistribution.OpenJdk: + case JavaDistribution.OracleOpenJdk: return new OpenJdkDistribution(installerOptions); default: return null; diff --git a/src/distributions/openjdk/installer.ts b/src/distributions/openjdk/installer.ts index 3041a563..8c8abea6 100644 --- a/src/distributions/openjdk/installer.ts +++ b/src/distributions/openjdk/installer.ts @@ -21,14 +21,14 @@ const OPENJDK_BASE_URL = 'https://jdk.java.net'; export class OpenJdkDistribution extends JavaBase { constructor(installerOptions: JavaInstallerOptions) { - super('OpenJDK', installerOptions); + super('Oracle OpenJDK', installerOptions); } protected async findPackageForDownload( range: string ): Promise { if (this.packageType !== 'jdk') { - throw new Error('OpenJDK provides only the `jdk` package type'); + throw new Error('Oracle OpenJDK provides only the `jdk` package type'); } const arch = this.distributionArchitecture();