diff --git a/dist/setup/index.js b/dist/setup/index.js index 24fb4239..13013cf3 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -3951,7 +3951,7 @@ const util_1 = __webpack_require__(322); class JavaBase { constructor(distribution, installerOptions) { this.distribution = distribution; - this.http = new httpm.HttpClient('setup-java', undefined, { + this.http = new httpm.HttpClient('actions/setup-java', undefined, { allowRetries: true, maxRetries: 3 }); @@ -3966,12 +3966,12 @@ class JavaBase { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { - core.info(`Java ${this.version.raw} is not found in tool-cache. Trying to download...`); + core.info(`Java ${this.version.raw} was not found in tool-cache. Trying to download...`); const javaRelease = yield this.findPackageForDownload(this.version); foundJava = yield this.downloadTool(javaRelease); core.info(`Java ${foundJava.version} was downloaded`); } - core.info(`Setting Java ${foundJava.version} as default`); + core.info(`Setting Java ${foundJava.version} as the default`); this.setJavaDefault(foundJava.version, foundJava.path); return foundJava; }); @@ -4023,7 +4023,7 @@ class JavaBase { stable = false; } if (!semver_1.default.validRange(version)) { - throw new Error(`The string '${version}' is not valid SemVer notation for Java version. Please check README file for code snippets and more detailed information`); + throw new Error(`The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information`); } return { version: new semver_1.default.Range(version), @@ -9352,14 +9352,14 @@ class LocalDistribution extends base_installer_1.JavaBase { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { - core.info(`Java ${this.version.raw} is not found in tool-cache. Trying to unpack JDK file...`); + core.info(`Java ${this.version.raw} was not found in tool-cache. Trying to unpack JDK file...`); if (!this.jdkFile) { throw new Error("'jdkFile' is not specified"); } const jdkFilePath = path_1.default.resolve(this.jdkFile); const stats = fs_1.default.statSync(jdkFilePath); if (!stats.isFile()) { - throw new Error(`JDK file is not found in path '${jdkFilePath}'`); + throw new Error(`JDK file was not found in path '${jdkFilePath}'`); } core.info(`Extracting Java from '${jdkFilePath}'`); const extractedJavaPath = yield util_1.extractJdkFile(jdkFilePath); diff --git a/src/distributions/adoptium/models.ts b/src/distributions/adoptium/models.ts index c524d355..27e87f8e 100644 --- a/src/distributions/adoptium/models.ts +++ b/src/distributions/adoptium/models.ts @@ -1,3 +1,5 @@ +// Models from https://api.adoptopenjdk.net/swagger-ui/#/Assets/get_v3_assets_version__version + export interface IAdoptiumAvailableVersions { binaries: [ { diff --git a/src/distributions/base-installer.ts b/src/distributions/base-installer.ts index 3798c3e9..670fb269 100644 --- a/src/distributions/base-installer.ts +++ b/src/distributions/base-installer.ts @@ -14,7 +14,7 @@ export abstract class JavaBase { protected stable: boolean; constructor(protected distribution: string, installerOptions: JavaInstallerOptions) { - this.http = new httpm.HttpClient('setup-java', undefined, { + this.http = new httpm.HttpClient('actions/setup-java', undefined, { allowRetries: true, maxRetries: 3 }); @@ -34,13 +34,13 @@ export abstract class JavaBase { if (foundJava) { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { - core.info(`Java ${this.version.raw} is not found in tool-cache. Trying to download...`); + core.info(`Java ${this.version.raw} was not found in tool-cache. Trying to download...`); const javaRelease = await this.findPackageForDownload(this.version); foundJava = await this.downloadTool(javaRelease); core.info(`Java ${foundJava.version} was downloaded`); } - core.info(`Setting Java ${foundJava.version} as default`); + core.info(`Setting Java ${foundJava.version} as the default`); this.setJavaDefault(foundJava.version, foundJava.path); return foundJava; @@ -103,7 +103,7 @@ export abstract class JavaBase { if (!semver.validRange(version)) { throw new Error( - `The string '${version}' is not valid SemVer notation for Java version. Please check README file for code snippets and more detailed information` + `The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information` ); } diff --git a/src/distributions/local/installer.ts b/src/distributions/local/installer.ts index 672564c3..864129f2 100644 --- a/src/distributions/local/installer.ts +++ b/src/distributions/local/installer.ts @@ -22,7 +22,7 @@ export class LocalDistribution extends JavaBase { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { core.info( - `Java ${this.version.raw} is not found in tool-cache. Trying to unpack JDK file...` + `Java ${this.version.raw} was not found in tool-cache. Trying to unpack JDK file...` ); if (!this.jdkFile) { throw new Error("'jdkFile' is not specified"); @@ -31,7 +31,7 @@ export class LocalDistribution extends JavaBase { const stats = fs.statSync(jdkFilePath); if (!stats.isFile()) { - throw new Error(`JDK file is not found in path '${jdkFilePath}'`); + throw new Error(`JDK file was not found in path '${jdkFilePath}'`); } core.info(`Extracting Java from '${jdkFilePath}'`); diff --git a/src/distributions/zulu/models.ts b/src/distributions/zulu/models.ts index 1dc7983c..a97406f0 100644 --- a/src/distributions/zulu/models.ts +++ b/src/distributions/zulu/models.ts @@ -1,3 +1,5 @@ +// Models from https://app.swaggerhub.com/apis-docs/azul/zulu-download-community/1.0 + export interface IZuluVersions { id: number; name: string;