mirror of
https://github.com/actions/setup-java.git
synced 2026-06-26 23:17:54 +00:00
Compare commits
3 Commits
5b9b3cc6e2
...
a6f2547a21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6f2547a21 | ||
|
|
c2317c0941 | ||
|
|
7a445ee88d |
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
@ -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`;
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user