From 5256614f4c9e604a68dffbe32ceebb6036ba21e3 Mon Sep 17 00:00:00 2001 From: John Oliver <1615532+johnoliver@users.noreply.github.com> Date: Wed, 9 Aug 2023 15:58:28 +0100 Subject: [PATCH] add warning --- src/distributions/adopt/installer.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/distributions/adopt/installer.ts b/src/distributions/adopt/installer.ts index 9104b96..33ccfb7 100644 --- a/src/distributions/adopt/installer.ts +++ b/src/distributions/adopt/installer.ts @@ -47,6 +47,11 @@ export class AdoptDistribution extends JavaBase { protected async findPackageForDownload( version: string ): Promise { + + if (this.jvmImpl == AdoptImplementation.Hotspot) { + core.notice("AdoptOpenJDK has moved to Eclipse Temurin https://github.com/actions/setup-java#supported-distributions please consider changing to the 'temurin' distribution type in your setup-java configuration.") + } + if (this.jvmImpl == AdoptImplementation.Hotspot && this.temurinDistribution != null) { try { let result = await this.temurinDistribution.findPackageForDownload(version) @@ -56,7 +61,7 @@ export class AdoptDistribution extends JavaBase { } } catch (error) { if (error.message.includes('Could not find satisfied version')) { - console.warn("The JVM you are looking for could not be found in the Temurin repository, this likely indicates " + + core.notice("The JVM you are looking for could not be found in the Temurin repository, this likely indicates " + "that you are using an out of date version of Java, consider updating and moving to using the Temurin distribution type in setup-java.") } }