Compare commits

..

3 Commits

Author SHA1 Message Date
Dmitry Shibanov
a6f2547a21
Merge c2317c0941 into 7a445ee88d 2023-12-21 14:49:20 +00:00
Dmitry Shibanov
c2317c0941 add comment 2023-12-21 15:49:13 +01:00
Michael Keppler
7a445ee88d
Fix typo in configuration example (#572) 2023-12-21 10:03:21 +01:00
3 changed files with 12 additions and 1 deletions

5
dist/setup/index.js vendored
View File

@ -123970,6 +123970,11 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extension = (0, util_1.getDownloadArchiveExtension)();
// Rename archive to add extension because after downloading
// archive does not contain extension type and it leads to some issues
// on Windows runners without PowerShell Core.
//
// For default PowerShell Windows it should contain extension type to unpack it.
if (process.platform === 'win32' &&
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
const javaArchivePathRenamed = `${javaArchivePath}.zip`;

View File

@ -463,7 +463,7 @@ The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combi
architecture: x64
```
This will generate a Toolchains entry with the following values: `version: 1.6`, `vendor: jkdfile`, `id: Oracle_1.6`.
This will generate a Toolchains entry with the following values: `version: 1.6`, `vendor: jdkfile`, `id: Oracle_1.6`.
### Modifying The Toolchain Vendor For JDKs
Each JDK provider will receive a default `vendor` using the `distribution` input value but this can be overridden with the `mvn-toolchain-vendor` parameter as follows.

View File

@ -30,6 +30,11 @@ export class MicrosoftDistributions extends JavaBase {
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
// Rename archive to add extension because after downloading
// archive does not contain extension type and it leads to some issues
// on Windows runners without PowerShell Core.
//
// For default PowerShell Windows it should contain extension type to unpack it.
if (
process.platform === 'win32' &&
(this.architecture === 'arm64' || this.architecture === 'aarch64')
@ -38,6 +43,7 @@ export class MicrosoftDistributions extends JavaBase {
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
javaArchivePath = javaArchivePathRenamed;
}
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
const archiveName = fs.readdirSync(extractedJavaPath)[0];