Compare commits

..

51 Commits

Author SHA1 Message Date
John Jiang 67fbd726da
Fix typos on Corretto (#665) (#666) 2024-08-08 12:07:49 -05:00
Accelerator1996 6a0805fcef
Fix the bug about parsing dragonwell version (#642) (#643) 2024-08-01 14:14:38 -05:00
dependabot[bot] fd08b9c8dc
Bump undici from 5.28.3 to 5.28.4 (#616)
* Bump undici from 5.28.3 to 5.28.4

Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump undici from 5.28.3 to 5.28.4

Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* bump braces from 3.0.2 to 3.0.3

* Added Semver link

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
2024-06-27 18:34:36 -05:00
HarithaVattikuti 2e74cbce18
Fix versions check failures (#634)
* fix macos latest failures

* fix failures
2024-05-22 10:26:50 -05:00
mahabaleshwars a1c6c9c867
Updated advanced-usage.md (#622)
* Update advanced-usage.md

* Update advanced-usage.md

* Update advanced-usage.md

* Update README.md

* Update advanced-usage.md
2024-05-03 08:29:31 -05:00
mahabaleshwars 99b8673ff6
Patch for java version file (#610)
* patch to extract file from other location

* patch to extract filename from other directories

* removed code failing checks

* changed the validation for .java-version type
2024-03-14 09:12:58 -05:00
mahabaleshwars 5896cecc08
Added .tool-versions file support (#606)
* added support for tool version file

* testing with one regex

* working regex

* Checked for the file extension

* added e2e checks for tool version

* removed error warning

* updated regex to support early version

* updated regex for early version support

* updated regex for early version

* updated regex to accept early versions

* added coreinfo to analyze

* updated the regex

* updated regex

* new regex for early version

* updated regex to match the new version file format

* new regex

* changed the regex

* redex updated

* used java version regex

* regex updated

* regex modified

* regex updated

* regex updated

* regex updated

* updated regex to support early versions

* Regex updated to support all java versions

* Documentation updated to add tool version description

* Documentation updated for the tool version file

* update the advanced doc and readme file to specify tool version changes
2024-03-12 08:45:42 -05:00
HarithaVattikuti 80ae3c2885
Update httpclient version and other dependencies (#607)
* test

* fixed license issues

* fix audit issue

* fix license
2024-03-08 10:25:58 -06:00
mahabaleshwars 9704b39bf2
Added Windows Arm64 Support for Windows Arm64 Runners (#595)
* Added Windows Arm64 Support for Windows Arm64 Runners

* microsoft test file update and tool-version test file

* Delete .DS_Store

* added test cases for windows and linux for zulu, liberica and microsoft

* adding different data files for each OS

* added changes to distribution files

* added more version support for microsoft
2024-02-27 23:11:33 -06:00
Michael Keppler 7a445ee88d
Fix typo in configuration example (#572) 2023-12-21 10:03:21 +01:00
Julien Dubois 3232623d9c
Oracle JDK 21 support (#538)
* Allow Oracle JDK 21 usage

* Fix tests

* Add Java 21 support in the documentation

---------

Co-authored-by: Ivan Zosimov <ivanzosimov@github.com>
2023-12-14 14:46:05 +01:00
Ivan c0660d8edc
docs: add note about maven-gpg-plugin version (#570) 2023-12-14 14:28:01 +01:00
Nikolas Grottendieck 2f7af1b9c5
make it clear that Java 21 is supported (#566)
Update examples and references to Java where older Java versions are used to
highlight the support of Java 21.

Specific provider examples are only updated where they support Java 21.

Fixes #557
2023-12-14 14:27:46 +01:00
Peter Murray 16ef37f8dd
HTTP errors when the token is undefined (#556)
* Fixing issues with the handling of the token and avoiding error on when the token is undefined

* chore: rebuild action

---------

Co-authored-by: Ivan Zosimov <ivanzosimov@github.com>
2023-12-01 14:55:03 +01:00
K.B.Dharun Krishna a2374547df
feat: bump actions/checkout and actions/setup-java to v4 (#533)
* eat: bump to use node20 runtime, actions/checkout to v4

* docs: update version of setup-java in documentation and e2e tests

---------

Co-authored-by: Ivan Zosimov <ivanzosimov@github.com>
2023-12-01 11:16:32 +01:00
aparnajyothi-y 387ac29b30
Upgrade Node to v20 (#558)
* Build changes

* 4.0.0

* node version update

* changes

* upgrade to v20

* Removing conflicts

* Upgrade to v20 in the reusable workflows

* Rebased index.js

* Removing conflicts

* Resolving conflicts

* Fomat check

* failed checks fix
2023-11-29 15:11:46 +01:00
itchyny 9eda6b51cc
feat: implement cache-dependency-path option to control caching dependency (#499) 2023-11-22 16:43:14 +01:00
Ivan 78078da0cd
Update @actions/cache dependency and documentation (#549)
* deps: Update actions/cache dep, rebuild solution, update docs

* docs: fix typo

* deps: update jest dependencies and licenses

* deps: fix vulnerable dependencies, rebuild solution

* licenses: update
2023-10-17 11:09:10 +02:00
Ralf Stuckert 5caaba646e
add support for microsoft openjdk 21.0.0 (#546)
* support for microsoft openjdk 21.0.0

* support for microsoft openjdk 21.0.0
2023-10-17 10:19:17 +02:00
Accelerator1996 0ab4596768
add support for dragonwell (#532)
* add support for dragonwell

* fix: update logic of parsing json file, refactor code

* build: rebuild action

* chore: update error message

* build: rebuild action

* tests: fix unit tests, add e2e tests

* chore: prettier, lint and rebuild solution

* feat: add check for the package type, update unit tests

* tests: update e2e tests

* tests: remove excess entries from e2e tests

* feat: update logic of getting json file

* feat: add logic for backuping getting json

* chore: update wordings

* chore: fix typos, add additional logs

* fix: fix review points

* chore: rebuild solution

* chore: update wordings

* chore: refactor code

---------

Co-authored-by: Ivan Zosimov <ivanzosimov@github.com>
Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com>
2023-09-20 13:22:11 +02:00
Marko Zivic 4075bfc1b5
Merge pull request #503 from gnodet/fix-xml-namespaces
Fix XML namespaces wrongly using https
2023-08-31 06:15:25 +02:00
Orleando Dassi 5b86b67f5b
Fixed usage link within the README.md file (#525) 2023-08-16 01:01:53 +02:00
CyberFlame b943a4ed87
fix typo and remove unintentional(?) word (#518)
* fix typo and remove unintentional(?) word

* docs: fix typo in the Readme.md

---------

Co-authored-by: Ivan Zosimov <ivanzosimov@github.com>
2023-07-31 11:29:53 +02:00
dependabot[bot] c16064d22c
Bump word-wrap from 1.2.3 to 1.2.4 (#516)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 13:48:48 +02:00
Endi327 cd89f46ac9
Add versions properties to cache (#280)
* Add versions properties to cache

* lint fix

npm run format change

* [FIX] unit test

* docs: fix typo in the Readme.md

* docs: update link to the toolkit/cache package

---------

Co-authored-by: Ivan Zosimov <ivan.zosimov@Ivans-MacBook-Pro.local>
2023-07-21 13:38:46 +02:00
Nikolai Laevskii 4fb397523b
Merge pull request #507 from akv-platform/update-oracle-jdk-url-calculation
Update Oracle JDK download URL calculation
2023-07-18 11:04:49 +02:00
Nikolai Laevskii 33b10b64eb Use archive as fallback only when dealing with major version 2023-07-18 09:28:12 +02:00
Ivan 75c6561172
Update dependencies (#511)
* chore: update dependencies, rebuild action

* chore: update licenses

* chore: rebuild action on linux
2023-07-10 17:20:15 +02:00
Nikolai Laevskii ebe05e0f88 Update build 2023-07-05 09:34:35 +02:00
Nikolai Laevskii 46099e1f14 Build 2023-07-05 09:34:34 +02:00
Nikolai Laevskii 1a3cd386c6 Update Oracle JDK URL calculation 2023-07-05 09:34:34 +02:00
Guillaume Nodet 91f49aa1b0 Fix XML namespaces wrongly using https 2023-06-28 11:24:07 +02:00
ragsmpl 1f2faad7e0
Instruction to download custom distribution JDK and install (#500) 2023-06-20 16:41:21 +02:00
Dmitry Shibanov 45058d7f99
Update xml2js (#484) 2023-06-15 17:41:12 +02:00
Nikolai Laevskii 87c1c7064c
Merge pull request #494 from akv-platform/remove-implicit-dependencies
Remove implicit dependencies
2023-06-08 11:53:50 +02:00
Nikolai Laevskii 5e4a7c3698 Move eslint-plugin-node to dev dependencies 2023-06-08 11:46:31 +02:00
Nikolai Laevskii f4213ceea0 Install eslint-plugin-node 2023-06-08 11:46:31 +02:00
github-actions[bot] ba4a2dd11d Update configuration files 2023-06-08 11:46:30 +02:00
Nikolai Laevskii 01a228c633
Merge pull request #498 from akv-platform/update-mocks
Update mocks
2023-06-08 11:44:43 +02:00
Nikolai Laevskii 07b6c30c67 Add mocks for oracle installer 2023-06-08 11:00:37 +02:00
Nikolai Laevskii c19d52bc93 Add mock data for microsoft-installer 2023-06-08 11:00:37 +02:00
Nikolai Laevskii 3927f47357
Merge pull request #489 from anishi1222/main
Update versions of Oracle JDK and Microsoft Build of OpenJDK
2023-06-08 10:58:50 +02:00
Akihiro Nishikawa cb77eb7f64
Merge pull request #1 from anishi1222/anishi1222-patch-1
Anishi1222 patch 1
2023-05-09 20:24:39 -07:00
Akihiro Nishikawa 9ff43a1ebe
Update microsoft-installer.test.ts 2023-05-10 12:20:09 +09:00
Akihiro Nishikawa 575d86297c
Update microsoft-openjdk-versions.json
Following Ivan's comment, versions of JDK are added.
2023-05-10 12:13:53 +09:00
Akihiro Nishikawa d70493eaf0
Update e2e-versions.yml 2023-05-08 18:48:02 +09:00
Akihiro Nishikawa 088a9ed5f6 Version updated for Oracle JDK 2023-05-06 18:54:05 +09:00
Akihiro Nishikawa 8d9836d093 Update versions 2023-05-06 18:41:28 +09:00
Akihiro Nishikawa 9f75459cbe Revert "Versions updated."
This reverts commit 827f99856d.

revert
2023-05-06 18:20:59 +09:00
Akihiro Nishikawa 827f99856d Versions updated. 2023-05-06 18:18:14 +09:00
Akihiro Nishikawa 27bb911606
Update microsoft-openjdk-versions.json 2023-05-06 18:00:17 +09:00
90 changed files with 92376 additions and 48317 deletions

View File

@ -15,3 +15,5 @@ jobs:
call-basic-validation:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '20.x'

View File

@ -15,3 +15,5 @@ jobs:
call-check-dist:
name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with:
node-version: '20.x'

View File

@ -0,0 +1,93 @@
name: Validate cache with cache-dependency-path option
on:
push:
branches:
- main
- releases/*
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
defaults:
run:
shell: bash
jobs:
gradle1-save:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
with:
distribution: 'adopt'
java-version: '11'
cache: gradle
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
- name: Create files to cache
# Need to avoid using Gradle daemon to stabilize the save process on Windows
# https://github.com/actions/cache/issues/454#issuecomment-840493935
run: |
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
if [ ! -d ~/.gradle/caches ]; then
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
exit 1
fi
gradle1-restore:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
needs: gradle1-save
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
with:
distribution: 'adopt'
java-version: '11'
cache: gradle
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
- name: Confirm that ~/.gradle/caches directory has been made
run: |
if [ ! -d ~/.gradle/caches ]; then
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
exit 1
fi
ls ~/.gradle/caches/
gradle2-restore:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
needs: gradle1-save
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
with:
distribution: 'adopt'
java-version: '11'
cache: gradle
cache-dependency-path: __tests__/cache/gradle2/*.gradle*
- name: Confirm that ~/.gradle/caches directory has not been made
run: |
if [ -d ~/.gradle/caches ]; then
echo "::error::The ~/.gradle/caches directory exists unexpectedly"
exit 1
fi

View File

@ -21,10 +21,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@ -36,7 +36,7 @@ jobs:
# Need to avoid using Gradle daemon to stabilize the save process on Windows
# https://github.com/actions/cache/issues/454#issuecomment-840493935
run: |
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
if [ ! -d ~/.gradle/caches ]; then
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
exit 1
@ -46,11 +46,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: gradle-save
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@ -70,10 +70,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run setup-java with the cache for maven
uses: ./
id: setup-java
@ -93,11 +93,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: maven-save
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run setup-java with the cache for maven
uses: ./
id: setup-java
@ -121,10 +121,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run setup-java with the cache for sbt
uses: ./
id: setup-java
@ -132,17 +132,21 @@ jobs:
distribution: 'adopt'
java-version: '11'
cache: sbt
- name: Setup SBT
if: matrix.os == 'macos-13'
run: |
echo ""Installing SBT...""
brew install sbt
- name: Create files to cache
run: sbt update
- name: Check files to cache on macos-latest
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-13'
run: |
if [ ! -d ~/Library/Caches/Coursier ]; then
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
exit 1
fi
- name: Check files to cache on windows-latest
if: matrix.os == 'windows-latest'
run: |
@ -150,7 +154,6 @@ jobs:
echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
exit 1
fi
- name: Check files to cache on ubuntu-latest
if: matrix.os == 'ubuntu-latest'
run: |
@ -158,7 +161,6 @@ jobs:
echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
exit 1
fi
sbt-restore:
runs-on: ${{ matrix.os }}
defaults:
@ -168,11 +170,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
needs: sbt-save
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run setup-java with the cache for sbt
uses: ./
id: setup-java
@ -182,14 +184,13 @@ jobs:
cache: sbt
- name: Confirm that ~/Library/Caches/Coursier directory has been made
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-13'
run: |
if [ ! -d ~/Library/Caches/Coursier ]; then
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
exit 1
fi
ls ~/Library/Caches/Coursier
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
if: matrix.os == 'windows-latest'
run: |
@ -198,7 +199,6 @@ jobs:
exit 1
fi
ls ~/AppData/Local/Coursier/Cache
- name: Confirm that ~/.cache/coursier directory has been made
if: matrix.os == 'ubuntu-latest'
run: |

View File

@ -21,7 +21,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download Adopt OpenJDK file
run: |
if ($IsLinux) {
@ -58,7 +58,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download Zulu OpenJDK file
run: |
if ($IsLinux) {
@ -95,7 +95,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download Eclipse Temurin file
run: |
if ($IsLinux) {

View File

@ -25,7 +25,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -60,7 +60,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create fake settings.xml
run: |
$xmlDirectory = Join-Path $HOME ".m2"
@ -96,7 +96,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create fake settings.xml
run: |
$xmlDirectory = Join-Path $HOME ".m2"
@ -133,7 +133,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java

View File

@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
distribution: [
'temurin',
'adopt',
@ -29,25 +29,29 @@ jobs:
'liberica',
'microsoft',
'semeru',
'corretto'
'corretto',
'dragonwell'
] # internally 'adopt-hotspot' is the same as 'adopt'
version: ['8', '11', '16']
version: ['21', '11', '17']
exclude:
- distribution: microsoft
version: 8
- distribution: dragonwell
os: macos-13
include:
- distribution: oracle
os: macos-latest
os: macos-13
version: 17
- distribution: oracle
os: windows-latest
version: 19
version: 20
- distribution: oracle
os: ubuntu-latest
version: 19
version: 20
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -69,15 +73,21 @@ jobs:
distribution: ['temurin', 'zulu', 'liberica']
version:
- '11.0'
- '8.0.302'
- '16.0.2+7'
- '21.0'
- '17.0.7+7'
include:
- distribution: oracle
os: ubuntu-latest
version: '19.0.1'
version: '20.0.1'
- distribution: dragonwell
os: ubuntu-latest
version: '11.0'
- distribution: dragonwell
os: ubuntu-latest
version: '11.0.13+9'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -96,10 +106,13 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica']
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
exclude:
- distribution: dragonwell
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -119,10 +132,13 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica']
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
exclude:
- distribution: dragonwell
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -155,11 +171,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
version: ['17-ea', '15.0.0-ea.14']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -181,7 +197,7 @@ jobs:
version: ['17-ea']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -199,22 +215,22 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-13, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica', 'semeru']
java-package: ['jre']
version: ['17.0']
include:
- distribution: 'zulu'
java-package: jre+fx
version: '8'
version: '21'
os: ubuntu-latest
- distribution: 'zulu'
java-package: jdk+fx
version: '8.0.242'
version: '21.0'
os: ubuntu-latest
- distribution: 'liberica'
java-package: jdk+fx
version: '8'
version: '21'
os: ubuntu-latest
- distribution: 'liberica'
java-package: jre+fx
@ -226,7 +242,7 @@ jobs:
os: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -252,7 +268,7 @@ jobs:
version: ['11']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
@ -272,19 +288,23 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['temurin', 'microsoft', 'corretto']
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "8" > .java-version
run: echo "17" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java 17" > .tool-versions
- name: setup-java
uses: ./
id: setup-java
with:
distribution: ${{ matrix.distribution }}
java-version: 11
java-version-file: '.java-version'
java-version-file: ${{matrix.java-version-file }}
- name: Verify Java
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
shell: bash
@ -297,18 +317,22 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto']
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "11" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java 11" > .tool-versions
- name: setup-java
uses: ./
id: setup-java
with:
distribution: ${{ matrix.distribution }}
java-version-file: '.java-version'
java-version-file: ${{matrix.java-version-file }}
- name: Verify Java
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
shell: bash
@ -321,42 +345,50 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['adopt', 'adopt-openj9', 'zulu']
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "11.0.2" > .java-version
run: echo "17.0.10" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java 17.0.10" > .tool-versions
- name: setup-java
uses: ./
id: setup-java
with:
distribution: ${{ matrix.distribution }}
java-version-file: '.java-version'
java-version-file: ${{matrix.java-version-file }}
- name: Verify Java
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
shell: bash
setup-java-version-from-file-major-minor-patch-with-dist:
name: ${{ matrix.distribution }} version from file 'openjdk64-11.0.2' - ${{ matrix.os }}
name: ${{ matrix.distribution }} version from file 'openjdk64-17.0.10' - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['adopt', 'zulu', 'liberica']
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create .java-version file
shell: bash
run: echo "openjdk64-11.0.2" > .java-version
run: echo "openjdk64-17.0.10" > .java-version
- name: Create .tool-versions file
shell: bash
run: echo "java openjdk64-17.0.10" > .tool-versions
- name: setup-java
uses: ./
id: setup-java
with:
distribution: ${{ matrix.distribution }}
java-version-file: '.java-version'
java-version-file: ${{matrix.java-version-file }}
- name: Verify Java
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
shell: bash

View File

@ -1,6 +1,6 @@
---
name: "@actions/cache"
version: 3.0.4
version: 3.2.4
type: npm
summary: Actions cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/cache

View File

@ -1,6 +1,6 @@
---
name: "@actions/core"
version: 1.10.0
version: 1.10.1
type: npm
summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/main/packages/core

View File

@ -1,30 +1,20 @@
---
name: "@actions/exec"
version: 1.0.4
version: 1.1.1
type: npm
summary: Actions exec lib
homepage: https://github.com/actions/toolkit/tree/master/packages/exec
homepage: https://github.com/actions/toolkit/tree/main/packages/exec
license: mit
licenses:
- sources: Auto-generated MIT license text
text: |
MIT License
- sources: LICENSE.md
text: |-
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Copyright 2019 GitHub
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []

View File

@ -1,6 +1,6 @@
---
name: "@actions/glob"
version: 0.2.0
version: 0.4.0
type: npm
summary: Actions glob lib
homepage: https://github.com/actions/toolkit/tree/main/packages/glob

View File

@ -1,32 +0,0 @@
---
name: "@actions/http-client"
version: 1.0.11
type: npm
summary: Actions Http Client
homepage: https://github.com/actions/http-client#readme
license: mit
licenses:
- sources: LICENSE
text: |
Actions Http Client for Node.js
Copyright (c) GitHub, Inc.
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []

View File

@ -1,6 +1,6 @@
---
name: "@actions/http-client"
version: 2.0.1
version: 2.2.1
type: npm
summary: Actions Http Client
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
@ -29,4 +29,4 @@ licenses:
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []
notices: []

View File

@ -1,30 +1,20 @@
---
name: "@actions/io"
version: 1.0.2
version: 1.1.3
type: npm
summary: Actions io lib
homepage: https://github.com/actions/toolkit/tree/master/packages/io
homepage: https://github.com/actions/toolkit/tree/main/packages/io
license: mit
licenses:
- sources: Auto-generated MIT license text
text: |
MIT License
- sources: LICENSE.md
text: |-
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Copyright 2019 GitHub
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []

View File

@ -1,6 +1,6 @@
---
name: "@actions/tool-cache"
version: 1.6.1
version: 2.0.1
type: npm
summary: Actions tool-cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/tool-cache

View File

@ -1,9 +1,9 @@
---
name: "@azure/abort-controller"
version: 1.0.4
version: 1.1.0
type: npm
summary: Microsoft Azure SDK for JavaScript - Aborter
homepage: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/abort-controller/README.md
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md
license: mit
licenses:
- sources: LICENSE

View File

@ -1,6 +1,6 @@
---
name: "@azure/core-auth"
version: 1.3.2
version: 1.5.0
type: npm
summary: Provides low-level interfaces and helper methods for authentication in Azure
SDK

View File

@ -1,6 +1,6 @@
---
name: "@azure/core-http"
version: 2.2.4
version: 3.0.4
type: npm
summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client
libraries generated using AutoRest

View File

@ -1,6 +1,6 @@
---
name: "@azure/core-lro"
version: 2.2.4
version: 2.5.4
type: npm
summary: Isomorphic client library for supporting long-running operations in node.js
and browser.

View File

@ -1,6 +1,6 @@
---
name: "@azure/core-paging"
version: 1.2.1
version: 1.5.0
type: npm
summary: Core types for paging async iterable iterators
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md

View File

@ -1,9 +1,9 @@
---
name: "@azure/core-asynciterator-polyfill"
version: 1.0.2
name: "@azure/core-util"
version: 1.6.1
type: npm
summary: Polyfill for IE/Node 8 for Symbol.asyncIterator
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-asynciterator-polyfill/README.md
summary: Core library for shared utility methods
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/
license: mit
licenses:
- sources: LICENSE

View File

@ -1,6 +1,6 @@
---
name: "@azure/logger"
version: 1.0.3
version: 1.0.4
type: npm
summary: Microsoft Azure SDK for JavaScript - Logger
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger/README.md

View File

@ -1,6 +1,6 @@
---
name: "@azure/ms-rest-js"
version: 2.6.1
version: 2.7.0
type: npm
summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client
libraries generated using AutoRest

View File

@ -1,6 +1,6 @@
---
name: "@azure/storage-blob"
version: 12.9.0
version: 12.17.0
type: npm
summary: Microsoft Azure Storage SDK for JavaScript - Blob
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/

30
.licenses/npm/@fastify/busboy.dep.yml generated Normal file
View File

@ -0,0 +1,30 @@
---
name: "@fastify/busboy"
version: 2.1.0
type: npm
summary: A streaming parser for HTML form data for node.js
homepage:
license: mit
licenses:
- sources: LICENSE
text: |-
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
notices: []

View File

@ -1,9 +1,9 @@
---
name: "@opentelemetry/api"
version: 1.0.4
version: 1.7.0
type: npm
summary: Public API for OpenTelemetry
homepage: https://github.com/open-telemetry/opentelemetry-js-api#readme
homepage: https://github.com/open-telemetry/opentelemetry-js/tree/main/api
license: apache-2.0
licenses:
- sources: LICENSE
@ -216,10 +216,8 @@ licenses:
[opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/api
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg
[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md
[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/sdk-registration.md
[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/tracing.md
[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/sdk-registration.md
notices: []

View File

@ -1,32 +0,0 @@
---
name: "@types/node"
version: 14.6.2
type: npm
summary: TypeScript definitions for Node.js
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped#readme
license: mit
licenses:
- sources: LICENSE
text: |2
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
notices: []

View File

@ -1,6 +1,6 @@
---
name: "@types/node-fetch"
version: 2.6.1
version: 2.6.9
type: npm
summary: TypeScript definitions for node-fetch
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch

View File

@ -1,8 +1,8 @@
---
name: "@types/node"
version: 16.11.25
version: 20.11.24
type: npm
summary: TypeScript definitions for Node.js
summary: TypeScript definitions for node
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
license: mit
licenses:

View File

@ -1,6 +1,6 @@
---
name: balanced-match
version: 1.0.0
version: 1.0.2
type: npm
summary: Match balanced character pairs, like "{" and "}"
homepage: https://github.com/juliangruber/balanced-match

View File

@ -1,33 +0,0 @@
---
name: form-data
version: 3.0.1
type: npm
summary: A library to create readable "multipart/form-data" streams. Can be used to
submit forms and file uploads to other web applications.
homepage: https://github.com/form-data/form-data#readme
license: mit
licenses:
- sources: License
text: |
Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
- sources: Readme.md
text: Form-Data is released under the [MIT](License) license.
notices: []

View File

@ -1,33 +1,34 @@
---
name: mime-db
version: 1.46.0
version: 1.52.0
type: npm
summary: Media Type Database
homepage: https://github.com/jshttp/mime-db#readme
homepage:
license: mit
licenses:
- sources: LICENSE
text: |2
text: |
(The MIT License)
The MIT License (MIT)
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015-2022 Douglas Christopher Wilson <doug@somethingdoug.com>
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []

View File

@ -1,9 +1,9 @@
---
name: mime-types
version: 2.1.29
version: 2.1.35
type: npm
summary: The ultimate javascript content-type utility.
homepage: https://github.com/jshttp/mime-types#readme
homepage:
license: mit
licenses:
- sources: LICENSE
@ -36,7 +36,7 @@ licenses:
[MIT](LICENSE)
[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci
[ci-url]: https://github.com/jshttp/mime-types/actions?query=workflow%3Aci
[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master
[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master
[node-version-image]: https://badgen.net/npm/node/mime-types

View File

@ -1,6 +1,6 @@
---
name: node-fetch
version: 2.6.7
version: 2.7.0
type: npm
summary: A light-weight module that brings window.fetch to node.js
homepage: https://github.com/bitinn/node-fetch

View File

@ -1,43 +0,0 @@
---
name: psl
version: 1.8.0
type: npm
summary: Domain name parser based on the Public Suffix List
homepage: https://github.com/lupomontero/psl#readme
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License (MIT)
Copyright (c) 2017 Lupo Montero lupomontero@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
text: |-
The MIT License (MIT)
Copyright (c) 2017 Lupo Montero <lupomontero@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
notices: []

View File

@ -1,34 +0,0 @@
---
name: punycode
version: 2.1.1
type: npm
summary: A robust Punycode converter that fully complies to RFC 3492 and RFC 5891,
and works on nearly all JavaScript platforms.
homepage: https://mths.be/punycode
license: mit
licenses:
- sources: LICENSE-MIT.txt
text: |
Copyright Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
text: Punycode.js is available under the [MIT](https://mths.be/mit) license.
notices: []

View File

@ -1,16 +1,16 @@
---
name: sax
version: 1.2.4
version: 1.3.0
type: npm
summary: An evented streaming XML parser in JavaScript
homepage: https://github.com/isaacs/sax-js#readme
homepage:
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@ -29,7 +29,7 @@ licenses:
`String.fromCodePoint` by Mathias Bynens used according to terms of MIT
License, as follows:
Copyright Mathias Bynens <https://mathiasbynens.be/>
Copyright (c) 2010-2022 Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -1,26 +0,0 @@
---
name: semver
version: 6.3.0
type: npm
summary: The semantic version parser used by npm.
homepage: https://github.com/npm/node-semver#readme
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []

View File

@ -1,6 +1,6 @@
---
name: semver
version: 7.3.8
version: 6.3.1
type: npm
summary: The semantic version parser used by npm.
homepage:

View File

@ -1,9 +1,9 @@
---
name: semver
version: 7.3.4
version: 7.6.0
type: npm
summary: The semantic version parser used by npm.
homepage: https://github.com/npm/node-semver#readme
homepage:
license: isc
licenses:
- sources: LICENSE

View File

@ -1,23 +0,0 @@
---
name: tough-cookie
version: 3.0.1
type: npm
summary: RFC6265 Cookies and Cookie Jar for node.js
homepage: https://github.com/salesforce/tough-cookie
license: bsd-3-clause
licenses:
- sources: LICENSE
text: |
Copyright (c) 2015, Salesforce.com, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
notices: []

View File

@ -1,23 +0,0 @@
---
name: tough-cookie
version: 4.0.0
type: npm
summary: RFC6265 Cookies and Cookie Jar for node.js
homepage: https://github.com/salesforce/tough-cookie
license: bsd-3-clause
licenses:
- sources: LICENSE
text: |
Copyright (c) 2015, Salesforce.com, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
notices: []

View File

@ -1,35 +0,0 @@
---
name: tslib
version: 2.3.1
type: npm
summary: Runtime library for TypeScript helper functions
homepage: https://www.typescriptlang.org/
license: 0bsd
licenses:
- sources: LICENSE.txt
text: |-
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
notices:
- sources: CopyrightNotice.txt
text: "/*! *****************************************************************************\r\nCopyright
(c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute
this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE
SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD
TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS
SOFTWARE.\r\n*****************************************************************************
*/"

23
.licenses/npm/tslib-2.6.2.dep.yml generated Normal file
View File

@ -0,0 +1,23 @@
---
name: tslib
version: 2.6.2
type: npm
summary: Runtime library for TypeScript helper functions
homepage: https://www.typescriptlang.org/
license: 0bsd
licenses:
- sources: LICENSE.txt
text: |-
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
notices: []

30
.licenses/npm/undici-types.dep.yml generated Normal file
View File

@ -0,0 +1,30 @@
---
name: undici-types
version: 5.26.5
type: npm
summary: A stand-alone types package for Undici
homepage: https://undici.nodejs.org
license: mit
licenses:
- sources: Auto-generated MIT license text
text: |
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
notices: []

View File

@ -1,16 +1,16 @@
---
name: ip-regex
version: 2.1.0
name: undici
version: 5.28.4
type: npm
summary: Regular expression for matching IP addresses (IPv4 & IPv6)
homepage: https://github.com/sindresorhus/ip-regex#readme
summary: An HTTP/1.1 client, written from scratch for Node.js
homepage: https://undici.nodejs.org
license: mit
licenses:
- sources: license
- sources: LICENSE
text: |
The MIT License (MIT)
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -19,16 +19,16 @@ licenses:
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
- sources: readme.md
text: MIT © [Sindre Sorhus](https://sindresorhus.com)
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- sources: README.md
text: MIT
notices: []

View File

@ -1,33 +0,0 @@
---
name: universalify
version: 0.1.2
type: npm
summary: Make a callback- or promise-based function support both promises and callbacks.
homepage: https://github.com/RyanZim/universalify#readme
license: mit
licenses:
- sources: LICENSE
text: |
(The MIT License)
Copyright (c) 2017, Ryan Zimmerman <opensrc@ryanzim.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
text: MIT
notices: []

View File

@ -1,6 +1,6 @@
---
name: xml2js
version: 0.4.23
version: 0.5.0
type: npm
summary: Simple XML to JavaScript object converter.
homepage: https://github.com/Leonidas-from-XIV/node-xml2js

View File

@ -1,6 +1,6 @@
---
name: xmlbuilder2
version: 2.4.0
version: 2.4.1
type: npm
summary: An XML builder for node.js
homepage: http://github.com/oozcitak/xmlbuilder2

View File

@ -5,7 +5,7 @@
[![Validate cache](https://github.com/actions/setup-java/actions/workflows/e2e-cache.yml/badge.svg?branch=main)](https://github.com/actions/setup-java/actions/workflows/e2e-cache.yml)
The `setup-java` action provides the following functionality for GitHub Actions runners:
- Downloading and setting up a requested version of Java. See [Usage](#Usage) for a list of supported distributions.
- Downloading and setting up a requested version of Java. See [Usage](#usage) for a list of supported distributions.
- Extracting and caching custom version of Java from a local file.
- Configuring runner for publishing using Apache Maven.
- Configuring runner for publishing using Gradle.
@ -27,11 +27,11 @@ This action allows you to work with Java and Scala projects.
- `java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified.
- `java-version-file`: The path to the `.java-version` file. See more details in [about `.java-version` file](docs/advanced-usage.md#Java-version-file).
- `java-version-file`: The path to a file containing java version. Supported file types are `.java-version` and `.tool-versions`. See more details in [about .java-version-file](docs/advanced-usage.md#Java-version-file).
- `distribution`: _(required)_ Java [distribution](#supported-distributions).
- `java-package`: The packaging variant of the choosen distribution. Possible values: `jdk`, `jre`, `jdk+fx`, `jre+fx`. Default value: `jdk`.
- `java-package`: The packaging variant of the chosen distribution. Possible values: `jdk`, `jre`, `jdk+fx`, `jre+fx`. Default value: `jdk`.
- `architecture`: The target architecture of the package. Possible values: `x86`, `x64`, `armv7`, `aarch64`, `ppc64le`. Default value: Derived from the runner machine.
@ -39,12 +39,14 @@ This action allows you to work with Java and Scala projects.
- `check-latest`: Setting this option makes the action to check for the latest available version for the version spec.
- `cache`: Quick [setup caching](#caching-packages-dependencies) for the dependencies managed through one of the predifined package managers. It can be one of "maven", "gradle" or "sbt".
- `cache`: Quick [setup caching](#caching-packages-dependencies) for the dependencies managed through one of the predefined package managers. It can be one of "maven", "gradle" or "sbt".
- `cache-dependency-path`: The path to a dependency file: pom.xml, build.gradle, build.sbt, etc. This option can be used with the `cache` option. If this option is omitted, the action searches for the dependency file in the entire repository. This option supports wildcards and a list of file names for caching multiple dependencies.
#### Maven options
The action has a bunch of inputs to generate maven's [settings.xml](https://maven.apache.org/settings.html) on the fly and pass the values to Apache Maven GPG Plugin as well as Apache Maven Toolchains. See [advanced usage](docs/advanced-usage.md) for more.
- `overwrite-settings`: By default action overwrites the settings.xml. In order to skip generation of file if it exists set this to `false`.
- `overwrite-settings`: By default action overwrites the settings.xml. In order to skip generation of file if it exists, set this to `false`.
- `server-id`: ID of the distributionManagement repository in the pom.xml file. Default is `github`.
@ -56,7 +58,7 @@ This action allows you to work with Java and Scala projects.
- `gpg-private-key`: GPG private key to import. Default is empty string.
- `gpg-passphrase`: description: Environment variable name for the GPG private key passphrase. Default is GPG_PASSPHRASE.
- `gpg-passphrase`: Environment variable name for the GPG private key passphrase. Default is GPG_PASSPHRASE.
- `mvn-toolchain-id`: Name of Maven Toolchain ID if the default name of `${distribution}_${java-version}` is not wanted.
@ -67,30 +69,30 @@ This action allows you to work with Java and Scala projects.
#### Eclipse Temurin
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
java-version: '21'
- run: java HelloWorldApp.java
```
#### Azul Zulu OpenJDK
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
java-version: '21'
- run: java HelloWorldApp.java
```
#### Supported version syntax
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
- major versions: `8`, `11`, `16`, `17`
- more specific versions: `17.0`, `11.0`, `11.0.4`, `8.0.232`, `8.0.282+8`
- early access (EA) versions: `15-ea`, `15.0.0-ea`, `15.0.0-ea.2`, `15.0.0+2-ea`
- major versions: `8`, `11`, `16`, `17`, `21`
- more specific versions: `8.0.282+8`, `8.0.232`, `11.0`, `11.0.4`, `17.0`
- early access (EA) versions: `15-ea`, `15.0.0-ea`
#### Supported distributions
Currently, the following distributions are supported:
@ -105,6 +107,7 @@ Currently, the following distributions are supported:
| `corretto` | Amazon Corretto Build of OpenJDK | [Link](https://aws.amazon.com/corretto/) | [Link](https://aws.amazon.com/corretto/faqs/)
| `semeru` | IBM Semeru Runtime Open Edition | [Link](https://developer.ibm.com/languages/java/semeru-runtimes/downloads/) | [Link](https://openjdk.java.net/legal/gplv2+ce.html) |
| `oracle` | Oracle JDK | [Link](https://www.oracle.com/java/technologies/downloads/) | [Link](https://java.com/freeuselicense)
| `dragonwell` | Alibaba Dragonwell JDK | [Link](https://dragonwell-jdk.io/) | [Link](https://www.aliyun.com/product/dragonwell/)
**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.
@ -113,11 +116,14 @@ Currently, the following distributions are supported:
**NOTE:** For Azul Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness.
### Caching packages dependencies
The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files:
- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, and `gradle/*.versions.toml`
The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files:
- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, `gradle/*.versions.toml`, and `**/versions.properties`
- maven: `**/pom.xml`
- sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.scala`, `**/project/**.sbt`
When the option `cache-dependency-path` is specified, the hash is based on the matching file. This option supports wildcards and a list of file names, and is especially useful for monorepos.
The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs).
The cache input is optional, and caching is turned off by default.
@ -125,24 +131,28 @@ The cache input is optional, and caching is turned off by default.
#### Caching gradle dependencies
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
cache: 'gradle'
cache-dependency-path: | # optional
sub-project/*.gradle*
sub-project/**/gradle-wrapper.properties
- run: ./gradlew build --no-daemon
```
#### Caching maven dependencies
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
cache: 'maven'
cache-dependency-path: 'sub-project/pom.xml' # optional
- name: Build with Maven
run: mvn -B package --file pom.xml
```
@ -150,16 +160,35 @@ steps:
#### Caching sbt dependencies
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
cache: 'sbt'
cache-dependency-path: | # optional
sub-project/build.sbt
sub-project/project/build.properties
- name: Build with SBT
run: sbt package
```
#### Cache segment restore timeout
Usually, cache gets downloaded in multiple segments of fixed sizes. Sometimes, a segment download gets stuck, which causes the workflow job to be stuck. The cache segment download timeout [was introduced](https://github.com/actions/toolkit/tree/main/packages/cache#cache-segment-restore-timeout) to solve this issue as it allows the segment download to get aborted and hence allows the job to proceed with a cache miss. The default value of the cache segment download timeout is set to 10 minutes and can be customized by specifying an environment variable named `SEGMENT_DOWNLOAD_TIMEOUT_MINS` with a timeout value in minutes.
```yaml
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- run: ./gradlew build --no-daemon
```
### Check latest
In the basic examples above, the `check-latest` flag defaults to `false`. When set to `false`, the action tries to first resolve a version of Java from the local tool cache on the runner. If unable to find a specific version in the cache, the action will download a version of Java. Use the default or set `check-latest` to `false` if you prefer a faster more consistent setup experience that prioritizes trying to use the cached versions at the expense of newer versions sometimes being available for download.
@ -171,11 +200,11 @@ For Java distributions that are not cached on Hosted images, `check-latest` alwa
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
check-latest: true
- run: java HelloWorldApp.java
```
@ -187,12 +216,12 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '8', '11', '17' ]
java: [ '8', '11', '17', '21' ]
name: Java ${{ matrix.Java }} sample
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: ${{ matrix.java }}
@ -205,7 +234,7 @@ All versions are added to the PATH. The last version will be used and available
```yaml
steps:
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |
@ -227,6 +256,7 @@ In the example above multiple JDKs are installed for the same job. The result af
- [Microsoft](docs/advanced-usage.md#Microsoft)
- [Amazon Corretto](docs/advanced-usage.md#Amazon-Corretto)
- [Oracle](docs/advanced-usage.md#Oracle)
- [Alibaba Dragonwell](docs/advanced-usage.md#Alibaba-Dragonwell)
- [Installing custom Java package type](docs/advanced-usage.md#Installing-custom-Java-package-type)
- [Installing custom Java architecture](docs/advanced-usage.md#Installing-custom-Java-architecture)
- [Installing custom Java distribution from local file](docs/advanced-usage.md#Installing-Java-from-local-file)
@ -236,6 +266,7 @@ In the example above multiple JDKs are installed for the same job. The result af
- [Publishing using Gradle](docs/advanced-usage.md#Publishing-using-Gradle)
- [Hosted Tool Cache](docs/advanced-usage.md#Hosted-Tool-Cache)
- [Modifying Maven Toolchains](docs/advanced-usage.md#Modifying-Maven-Toolchains)
- [Java Version File](docs/advanced-usage.md#Java-version-file)
## License

View File

@ -6,6 +6,7 @@ import * as fs from 'fs';
import * as os from 'os';
import * as core from '@actions/core';
import * as cache from '@actions/cache';
import * as glob from '@actions/glob';
describe('dependency cache', () => {
const ORIGINAL_RUNNER_OS = process.env['RUNNER_OS'];
@ -64,6 +65,10 @@ describe('dependency cache', () => {
ReturnType<typeof cache.restoreCache>,
Parameters<typeof cache.restoreCache>
>;
let spyGlobHashFiles: jest.SpyInstance<
ReturnType<typeof glob.hashFiles>,
Parameters<typeof glob.hashFiles>
>;
beforeEach(() => {
spyCacheRestore = jest
@ -71,18 +76,19 @@ describe('dependency cache', () => {
.mockImplementation((paths: string[], primaryKey: string) =>
Promise.resolve(undefined)
);
spyGlobHashFiles = jest.spyOn(glob, 'hashFiles');
spyWarning.mockImplementation(() => null);
});
it('throws error if unsupported package manager specified', () => {
return expect(restore('ant')).rejects.toThrow(
return expect(restore('ant', '')).rejects.toThrow(
'unknown package manager specified: ant'
);
});
describe('for maven', () => {
it('throws error if no pom.xml found', async () => {
await expect(restore('maven')).rejects.toThrow(
await expect(restore('maven', '')).rejects.toThrow(
`No file in ${projectRoot(
workspace
)} matched to [**/pom.xml], make sure you have checked out the target repository`
@ -91,33 +97,40 @@ describe('dependency cache', () => {
it('downloads cache', async () => {
createFile(join(workspace, 'pom.xml'));
await restore('maven');
await restore('maven', '');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith('**/pom.xml');
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('maven cache is not found');
});
});
describe('for gradle', () => {
it('throws error if no build.gradle found', async () => {
await expect(restore('gradle')).rejects.toThrow(
await expect(restore('gradle', '')).rejects.toThrow(
`No file in ${projectRoot(
workspace
)} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt,gradle/*.versions.toml], make sure you have checked out the target repository`
)} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt,gradle/*.versions.toml,**/versions.properties], make sure you have checked out the target repository`
);
});
it('downloads cache based on build.gradle', async () => {
createFile(join(workspace, 'build.gradle'));
await restore('gradle');
await restore('gradle', '');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
});
it('downloads cache based on build.gradle.kts', async () => {
createFile(join(workspace, 'build.gradle.kts'));
await restore('gradle');
await restore('gradle', '');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
});
@ -125,24 +138,30 @@ describe('dependency cache', () => {
createDirectory(join(workspace, 'gradle'));
createFile(join(workspace, 'gradle', 'libs.versions.toml'));
await restore('gradle');
await restore('gradle', '');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
});
it('downloads cache based on buildSrc/Versions.kt', async () => {
createDirectory(join(workspace, 'buildSrc'));
createFile(join(workspace, 'buildSrc', 'Versions.kt'));
await restore('gradle', '');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
});
});
it('downloads cache based on buildSrc/Versions.kt', async () => {
createDirectory(join(workspace, 'buildSrc'));
createFile(join(workspace, 'buildSrc', 'Versions.kt'));
await restore('gradle');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
});
describe('for sbt', () => {
it('throws error if no build.sbt found', async () => {
await expect(restore('sbt')).rejects.toThrow(
await expect(restore('sbt', '')).rejects.toThrow(
`No file in ${projectRoot(
workspace
)} matched to [**/*.sbt,**/project/build.properties,**/project/**.scala,**/project/**.sbt], make sure you have checked out the target repository`
@ -151,8 +170,11 @@ describe('dependency cache', () => {
it('downloads cache', async () => {
createFile(join(workspace, 'build.sbt'));
await restore('sbt');
await restore('sbt', '');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'**/*.sbt\n**/project/build.properties\n**/project/**.scala\n**/project/**.sbt'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('sbt cache is not found');
});
@ -161,11 +183,11 @@ describe('dependency cache', () => {
createDirectory(join(workspace, 'project'));
createFile(join(workspace, 'project/DependenciesV1.scala'));
await restore('sbt');
await restore('sbt', '');
const firstCall = spySaveState.mock.calls.toString();
spySaveState.mockClear();
await restore('sbt');
await restore('sbt', '');
const secondCall = spySaveState.mock.calls.toString();
// Make sure multiple restores produce the same cache
@ -173,12 +195,64 @@ describe('dependency cache', () => {
spySaveState.mockClear();
createFile(join(workspace, 'project/DependenciesV2.scala'));
await restore('sbt');
await restore('sbt', '');
const thirdCall = spySaveState.mock.calls.toString();
expect(firstCall).not.toBe(thirdCall);
});
});
it('downloads cache based on versions.properties', async () => {
createFile(join(workspace, 'versions.properties'));
await restore('gradle', '');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
});
describe('cache-dependency-path', () => {
it('throws error if no matching dependency file found', async () => {
createFile(join(workspace, 'build.gradle.kts'));
await expect(
restore('gradle', 'sub-project/**/build.gradle.kts')
).rejects.toThrow(
`No file in ${projectRoot(
workspace
)} matched to [sub-project/**/build.gradle.kts], make sure you have checked out the target repository`
);
});
it('downloads cache based on the specified pattern', async () => {
createFile(join(workspace, 'build.gradle.kts'));
createDirectory(join(workspace, 'sub-project1'));
createFile(join(workspace, 'sub-project1', 'build.gradle.kts'));
createDirectory(join(workspace, 'sub-project2'));
createFile(join(workspace, 'sub-project2', 'build.gradle.kts'));
await restore('gradle', 'build.gradle.kts');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith('build.gradle.kts');
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
await restore('gradle', 'sub-project1/**/*.gradle*\n');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'sub-project1/**/*.gradle*'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
await restore('gradle', '*.gradle*\nsub-project2/**/*.gradle*\n');
expect(spyCacheRestore).toHaveBeenCalled();
expect(spyGlobHashFiles).toHaveBeenCalledWith(
'*.gradle*\nsub-project2/**/*.gradle*'
);
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
});
});
});
describe('save', () => {
let spyCacheSave: jest.SpyInstance<
@ -333,6 +407,17 @@ describe('dependency cache', () => {
expect.stringMatching(/^Cache saved with the key:.*/)
);
});
it('uploads cache based on versions.properties', async () => {
createFile(join(workspace, 'versions.properties'));
createStateForSuccessfulRestore();
await save('gradle');
expect(spyCacheSave).toHaveBeenCalled();
expect(spyWarning).not.toHaveBeenCalled();
expect(spyInfo).toHaveBeenCalledWith(
expect.stringMatching(/^Cache saved with the key:.*/)
);
});
});
});
});

12
__tests__/cache/gradle2/.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
.gradle
**/build/
!src/**/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache

17
__tests__/cache/gradle2/build.gradle vendored Normal file
View File

@ -0,0 +1,17 @@
plugins {
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
}
tasks.register('downloadDependencies') {
doLast {
def total = configurations.compileClasspath.inject (0) { sum, file ->
sum + file.length()
}
println total
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,443 @@
[
{
"buildVersion": 36,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14+36/bellsoft-jdk14+36-linux-amd64.zip",
"interimVersion": 0,
"version": "14+36",
"featureVersion": 14
},
{
"buildVersion": 9,
"updateVersion": 11,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.11+9/bellsoft-jdk11.0.11+9-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.11+9",
"featureVersion": 11
},
{
"buildVersion": 8,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.1+8/bellsoft-jdk14.0.1+8-linux-amd64.zip",
"interimVersion": 0,
"version": "14.0.1+8",
"featureVersion": 14
},
{
"buildVersion": 10,
"updateVersion": 262,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u262+10/bellsoft-jdk8u262+10-linux-amd64.zip",
"interimVersion": 0,
"version": "8u262+10",
"featureVersion": 8
},
{
"buildVersion": 1,
"updateVersion": 275,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u275+1/bellsoft-jdk8u275+1-linux-amd64.zip",
"interimVersion": 0,
"version": "8u275+1",
"featureVersion": 8
},
{
"buildVersion": 1,
"updateVersion": 9,
"patchVersion": 1,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9.1+1/bellsoft-jdk11.0.9.1+1-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.9.1+1",
"featureVersion": 11
},
{
"buildVersion": 8,
"updateVersion": 202,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u202/bellsoft-jdk8u202-linux-amd64.zip",
"interimVersion": 0,
"version": "8u202+8",
"featureVersion": 8
},
{
"buildVersion": 33,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12/bellsoft-jdk12-linux-amd64.zip",
"interimVersion": 0,
"version": "12+33",
"featureVersion": 12
},
{
"buildVersion": 8,
"updateVersion": 282,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u282+8/bellsoft-jdk8u282+8-linux-amd64.zip",
"interimVersion": 0,
"version": "8u282+8",
"featureVersion": 8
},
{
"buildVersion": 11,
"updateVersion": 9,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+11/bellsoft-jdk11.0.9+11-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.9+11",
"featureVersion": 11
},
{
"buildVersion": 33,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13/bellsoft-jdk13-linux-amd64.zip",
"interimVersion": 0,
"version": "13+33",
"featureVersion": 13
},
{
"buildVersion": 12,
"updateVersion": 9,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+12/bellsoft-jdk11.0.9+12-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.9+12",
"featureVersion": 11
},
{
"buildVersion": 7,
"updateVersion": 242,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u242+7/bellsoft-jdk8u242+7-linux-amd64.zip",
"interimVersion": 0,
"version": "8u242+7",
"featureVersion": 8
},
{
"buildVersion": 9,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.2+9/bellsoft-jdk13.0.2+9-linux-amd64.zip",
"interimVersion": 0,
"version": "13.0.2+9",
"featureVersion": 13
},
{
"buildVersion": 9,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1/bellsoft-jdk13.0.1-linux-amd64.zip",
"interimVersion": 0,
"version": "13.0.1+9",
"featureVersion": 13
},
{
"buildVersion": 1,
"updateVersion": 265,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u265+1/bellsoft-jdk8u265+1-linux-amd64.zip",
"interimVersion": 0,
"version": "8u265+1",
"featureVersion": 8
},
{
"buildVersion": 9,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.1+9/bellsoft-jdk15.0.1+9-linux-amd64.zip",
"interimVersion": 0,
"version": "15.0.1+9",
"featureVersion": 15
},
{
"buildVersion": 10,
"updateVersion": 272,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u272+10/bellsoft-jdk8u272+10-linux-amd64.zip",
"interimVersion": 0,
"version": "8u272+10",
"featureVersion": 8
},
{
"buildVersion": 7,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.2+7/bellsoft-jdk16.0.2+7-linux-amd64.zip",
"interimVersion": 0,
"version": "16.0.2+7",
"featureVersion": 16
},
{
"buildVersion": 10,
"updateVersion": 6,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.6+10/bellsoft-jdk11.0.6+10-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.6+10",
"featureVersion": 11
},
{
"buildVersion": 9,
"updateVersion": 252,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jdk8u252+9-linux-amd64.zip",
"interimVersion": 0,
"version": "8u252+9",
"featureVersion": 8
},
{
"buildVersion": 12,
"updateVersion": 212,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u212/bellsoft-jdk8u212-linux-amd64.zip",
"interimVersion": 0,
"version": "8u212+12",
"featureVersion": 8
},
{
"buildVersion": 10,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+10/bellsoft-jdk15.0.2+10-linux-amd64.zip",
"interimVersion": 0,
"version": "15.0.2+10",
"featureVersion": 15
},
{
"buildVersion": 9,
"updateVersion": 10,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.10+9/bellsoft-jdk11.0.10+9-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.10+9",
"featureVersion": 11
},
{
"buildVersion": 0,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.1/bellsoft-jdk11.0.1-linux-amd64.tar.gz",
"interimVersion": 0,
"version": "11.0.1+0",
"featureVersion": 11
},
{
"buildVersion": 7,
"updateVersion": 12,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.12+7/bellsoft-jdk11.0.12+7-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.12+7",
"featureVersion": 11
},
{
"buildVersion": 36,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16+36/bellsoft-jdk16+36-linux-amd64.zip",
"interimVersion": 0,
"version": "16+36",
"featureVersion": 16
},
{
"buildVersion": 12,
"updateVersion": 3,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.3/bellsoft-jdk11.0.3-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.3+12",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 8,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.8+10/bellsoft-jdk11.0.8+10-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.8+10",
"featureVersion": 11
},
{
"buildVersion": 7,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.2/bellsoft-jdk11.0.2-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.2+7",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 5,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5/bellsoft-jdk11.0.5-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.5+10",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 4,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.4/bellsoft-jdk11.0.4-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.4+10",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.2/bellsoft-jdk12.0.2-linux-amd64.zip",
"interimVersion": 0,
"version": "12.0.2+10",
"featureVersion": 12
},
{
"buildVersion": 12,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.1/bellsoft-jdk12.0.1-linux-amd64.zip",
"interimVersion": 0,
"version": "12.0.1+12",
"featureVersion": 12
},
{
"buildVersion": 10,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1+10/bellsoft-jdk13.0.1+10-linux-amd64.zip",
"interimVersion": 0,
"version": "13.0.1+10",
"featureVersion": 13
},
{
"buildVersion": 11,
"updateVersion": 5,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-linux-amd64.tar.gz",
"interimVersion": 0,
"version": "11.0.5+11",
"featureVersion": 11
},
{
"buildVersion": 11,
"updateVersion": 5,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.5+11",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 292,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u292+10/bellsoft-jdk8u292+10-linux-amd64.zip",
"interimVersion": 0,
"version": "8u292+10",
"featureVersion": 8
},
{
"buildVersion": 11,
"updateVersion": 222,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u222/bellsoft-jdk8u222-linux-amd64.zip",
"interimVersion": 0,
"version": "8u222+11",
"featureVersion": 8
},
{
"buildVersion": 36,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15+36/bellsoft-jdk15+36-linux-amd64.zip",
"interimVersion": 0,
"version": "15+36",
"featureVersion": 15
},
{
"buildVersion": 10,
"updateVersion": 7,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jdk11.0.7+10-linux-amd64.zip",
"interimVersion": 0,
"version": "11.0.7+10",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 232,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232+10/bellsoft-jdk8u232+10-linux-amd64.zip",
"interimVersion": 0,
"version": "8u232+10",
"featureVersion": 8
},
{
"buildVersion": 8,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+8/bellsoft-jdk15.0.2+8-linux-amd64.zip",
"interimVersion": 0,
"version": "15.0.2+8",
"featureVersion": 15
},
{
"buildVersion": 8,
"updateVersion": 302,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u302+8/bellsoft-jdk8u302+8-linux-amd64.zip",
"interimVersion": 0,
"version": "8u302+8",
"featureVersion": 8
},
{
"buildVersion": 12,
"updateVersion": 192,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u192.all/bellsoft-jdk1.8.0-linux-amd64.tar.gz",
"interimVersion": 0,
"version": "8u192+12",
"featureVersion": 8
},
{
"buildVersion": 13,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.2+13/bellsoft-jdk14.0.2+13-linux-amd64.zip",
"interimVersion": 0,
"version": "14.0.2+13",
"featureVersion": 14
},
{
"buildVersion": 9,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.1+9/bellsoft-jdk16.0.1+9-linux-amd64.zip",
"interimVersion": 0,
"version": "16.0.1+9",
"featureVersion": 16
},
{
"buildVersion": 9,
"updateVersion": 232,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232/bellsoft-jdk8u232-linux-amd64.zip",
"interimVersion": 0,
"version": "8u232+9",
"featureVersion": 8
},
{
"buildVersion": 13,
"updateVersion": 10,
"patchVersion": 0,
"downloadUrl":"https://download.bell-sw.com/java/17.0.10+13/bellsoft-jdk17.0.10+13-linux-amd64.tar.gz",
"interimVersion": 0,
"version": "17.0.10+13",
"featureVersion": 17
}
]

View File

@ -0,0 +1,452 @@
[
{
"buildVersion": 36,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14+36/bellsoft-jdk14+36-windows-amd64.zip",
"interimVersion": 0,
"version": "14+36",
"featureVersion": 14
},
{
"buildVersion": 9,
"updateVersion": 11,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.11+9/bellsoft-jdk11.0.11+9-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.11+9",
"featureVersion": 11
},
{
"buildVersion": 8,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.1+8/bellsoft-jdk14.0.1+8-windows-amd64.zip",
"interimVersion": 0,
"version": "14.0.1+8",
"featureVersion": 14
},
{
"buildVersion": 10,
"updateVersion": 262,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u262+10/bellsoft-jdk8u262+10-windows-amd64.zip",
"interimVersion": 0,
"version": "8u262+10",
"featureVersion": 8
},
{
"buildVersion": 1,
"updateVersion": 275,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u275+1/bellsoft-jdk8u275+1-windows-amd64.zip",
"interimVersion": 0,
"version": "8u275+1",
"featureVersion": 8
},
{
"buildVersion": 1,
"updateVersion": 9,
"patchVersion": 1,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9.1+1/bellsoft-jdk11.0.9.1+1-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.9.1+1",
"featureVersion": 11
},
{
"buildVersion": 8,
"updateVersion": 202,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u202/bellsoft-jdk8u202-windows-amd64.zip",
"interimVersion": 0,
"version": "8u202+8",
"featureVersion": 8
},
{
"buildVersion": 33,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12/bellsoft-jdk12-windows-amd64.zip",
"interimVersion": 0,
"version": "12+33",
"featureVersion": 12
},
{
"buildVersion": 8,
"updateVersion": 282,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u282+8/bellsoft-jdk8u282+8-windows-amd64.zip",
"interimVersion": 0,
"version": "8u282+8",
"featureVersion": 8
},
{
"buildVersion": 11,
"updateVersion": 9,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+11/bellsoft-jdk11.0.9+11-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.9+11",
"featureVersion": 11
},
{
"buildVersion": 33,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13/bellsoft-jdk13-windows-amd64.zip",
"interimVersion": 0,
"version": "13+33",
"featureVersion": 13
},
{
"buildVersion": 12,
"updateVersion": 9,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+12/bellsoft-jdk11.0.9+12-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.9+12",
"featureVersion": 11
},
{
"buildVersion": 7,
"updateVersion": 242,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u242+7/bellsoft-jdk8u242+7-windows-amd64.zip",
"interimVersion": 0,
"version": "8u242+7",
"featureVersion": 8
},
{
"buildVersion": 9,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.2+9/bellsoft-jdk13.0.2+9-windows-amd64.zip",
"interimVersion": 0,
"version": "13.0.2+9",
"featureVersion": 13
},
{
"buildVersion": 9,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1/bellsoft-jdk13.0.1-windows-amd64.zip",
"interimVersion": 0,
"version": "13.0.1+9",
"featureVersion": 13
},
{
"buildVersion": 1,
"updateVersion": 265,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u265+1/bellsoft-jdk8u265+1-windows-amd64.zip",
"interimVersion": 0,
"version": "8u265+1",
"featureVersion": 8
},
{
"buildVersion": 9,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.1+9/bellsoft-jdk15.0.1+9-windows-amd64.zip",
"interimVersion": 0,
"version": "15.0.1+9",
"featureVersion": 15
},
{
"buildVersion": 10,
"updateVersion": 272,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u272+10/bellsoft-jdk8u272+10-windows-amd64.zip",
"interimVersion": 0,
"version": "8u272+10",
"featureVersion": 8
},
{
"buildVersion": 7,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.2+7/bellsoft-jdk16.0.2+7-windows-amd64.zip",
"interimVersion": 0,
"version": "16.0.2+7",
"featureVersion": 16
},
{
"buildVersion": 10,
"updateVersion": 6,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.6+10/bellsoft-jdk11.0.6+10-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.6+10",
"featureVersion": 11
},
{
"buildVersion": 9,
"updateVersion": 252,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jdk8u252+9-windows-amd64.zip",
"interimVersion": 0,
"version": "8u252+9",
"featureVersion": 8
},
{
"buildVersion": 12,
"updateVersion": 212,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u212/bellsoft-jdk8u212-windows-amd64.zip",
"interimVersion": 0,
"version": "8u212+12",
"featureVersion": 8
},
{
"buildVersion": 10,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+10/bellsoft-jdk15.0.2+10-windows-amd64.zip",
"interimVersion": 0,
"version": "15.0.2+10",
"featureVersion": 15
},
{
"buildVersion": 9,
"updateVersion": 10,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.10+9/bellsoft-jdk11.0.10+9-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.10+9",
"featureVersion": 11
},
{
"buildVersion": 0,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.1/bellsoft-jdk11.0.1-windows-amd64.tar.gz",
"interimVersion": 0,
"version": "11.0.1+0",
"featureVersion": 11
},
{
"buildVersion": 7,
"updateVersion": 12,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.12+7/bellsoft-jdk11.0.12+7-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.12+7",
"featureVersion": 11
},
{
"buildVersion": 36,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16+36/bellsoft-jdk16+36-windows-amd64.zip",
"interimVersion": 0,
"version": "16+36",
"featureVersion": 16
},
{
"buildVersion": 12,
"updateVersion": 3,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.3/bellsoft-jdk11.0.3-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.3+12",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 8,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.8+10/bellsoft-jdk11.0.8+10-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.8+10",
"featureVersion": 11
},
{
"buildVersion": 7,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.2/bellsoft-jdk11.0.2-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.2+7",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 5,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5/bellsoft-jdk11.0.5-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.5+10",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 4,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.4/bellsoft-jdk11.0.4-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.4+10",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.2/bellsoft-jdk12.0.2-windows-amd64.zip",
"interimVersion": 0,
"version": "12.0.2+10",
"featureVersion": 12
},
{
"buildVersion": 12,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.1/bellsoft-jdk12.0.1-windows-amd64.zip",
"interimVersion": 0,
"version": "12.0.1+12",
"featureVersion": 12
},
{
"buildVersion": 10,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1+10/bellsoft-jdk13.0.1+10-windows-amd64.zip",
"interimVersion": 0,
"version": "13.0.1+10",
"featureVersion": 13
},
{
"buildVersion": 11,
"updateVersion": 5,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-windows-amd64.tar.gz",
"interimVersion": 0,
"version": "11.0.5+11",
"featureVersion": 11
},
{
"buildVersion": 11,
"updateVersion": 5,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.5+11",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 292,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u292+10/bellsoft-jdk8u292+10-windows-amd64.zip",
"interimVersion": 0,
"version": "8u292+10",
"featureVersion": 8
},
{
"buildVersion": 11,
"updateVersion": 222,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u222/bellsoft-jdk8u222-windows-amd64.zip",
"interimVersion": 0,
"version": "8u222+11",
"featureVersion": 8
},
{
"buildVersion": 36,
"updateVersion": 0,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15+36/bellsoft-jdk15+36-windows-amd64.zip",
"interimVersion": 0,
"version": "15+36",
"featureVersion": 15
},
{
"buildVersion": 10,
"updateVersion": 7,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jdk11.0.7+10-windows-amd64.zip",
"interimVersion": 0,
"version": "11.0.7+10",
"featureVersion": 11
},
{
"buildVersion": 10,
"updateVersion": 232,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232+10/bellsoft-jdk8u232+10-windows-amd64.zip",
"interimVersion": 0,
"version": "8u232+10",
"featureVersion": 8
},
{
"buildVersion": 8,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+8/bellsoft-jdk15.0.2+8-windows-amd64.zip",
"interimVersion": 0,
"version": "15.0.2+8",
"featureVersion": 15
},
{
"buildVersion": 8,
"updateVersion": 302,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u302+8/bellsoft-jdk8u302+8-windows-amd64.zip",
"interimVersion": 0,
"version": "8u302+8",
"featureVersion": 8
},
{
"buildVersion": 12,
"updateVersion": 192,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u192.all/bellsoft-jdk1.8.0-windows-amd64.tar.gz",
"interimVersion": 0,
"version": "8u192+12",
"featureVersion": 8
},
{
"buildVersion": 13,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.2+13/bellsoft-jdk14.0.2+13-windows-amd64.zip",
"interimVersion": 0,
"version": "14.0.2+13",
"featureVersion": 14
},
{
"buildVersion": 9,
"updateVersion": 1,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.1+9/bellsoft-jdk16.0.1+9-windows-amd64.zip",
"interimVersion": 0,
"version": "16.0.1+9",
"featureVersion": 16
},
{
"buildVersion": 9,
"updateVersion": 232,
"patchVersion": 0,
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232/bellsoft-jdk8u232-windows-amd64.zip",
"interimVersion": 0,
"version": "8u232+9",
"featureVersion": 8
},
{
"buildVersion": 14,
"updateVersion": 2,
"patchVersion": 0,
"downloadUrl": "https://download.bell-sw.com/java/21.0.2+14/bellsoft-jdk21.0.2+14-windows-aarch64.zip",
"interimVersion": 0,
"version": "21.0.2+14",
"featureVersion": 21
},
{
"buildVersion": 13,
"updateVersion": 10,
"patchVersion": 0,
"downloadUrl": "https://download.bell-sw.com/java/17.0.10+13/bellsoft-jdk17.0.10+13-windows-aarch64.zip",
"interimVersion": 0,
"version": "17.0.10+13",
"featureVersion": 17
}
]

View File

@ -0,0 +1,261 @@
[
{
"version": "21.0.0",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-21.0.0-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.0-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-windows-x64.zip"
},
{
"filename": "microsoft-jdk-21.0.0-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.0-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-linux-aarch64.tar.gz"
}
]
},
{
"version": "17.0.7",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-17.0.7-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.7-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.7-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-x64.zip"
},
{
"filename": "microsoft-jdk-17.0.7-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.7-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.7-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-aarch64.zip"
}
]
},
{
"version": "17.0.1+12.1",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-17.0.1.12.1-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.1.12.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.1.12.1-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-windows-x64.zip"
},
{
"filename": "microsoft-jdk-17.0.1.12.1-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-17.0.1.12.1-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-linux-aarch64.tar.gz"
}
]
},
{
"version": "16.0.2+7.1",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-16.0.2.7.1-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-16.0.2.7.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-16.0.2.7.1-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-windows-x64.zip"
},
{
"filename": "microsoft-jdk-16.0.2.7.1-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-16.0.2.7.1-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-linux-aarch64.tar.gz"
}
]
},
{
"version": "11.0.19",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-11.0.19-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.19-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.19-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-windows-x64.zip"
},
{
"filename": "microsoft-jdk-11.0.19-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.19-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-aarch64.tar.gz"
}
]
},
{
"version": "11.0.15",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-11.0.15-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.15-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.15-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-windows-x64.zip"
},
{
"filename": "microsoft-jdk-11.0.15-macos-aarch64.tar.gz",
"arch": "aarch64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-macos-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.15-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-linux-aarch64.tar.gz"
}
]
},
{
"version": "11.0.13+8.1",
"stable": true,
"release_url": "https://aka.ms/download-jdk",
"files": [
{
"filename": "microsoft-jdk-11.0.13.8.1-macos-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-macos-x64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.13.8.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-linux-x64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.13.8.1-windows-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-x64.zip"
},
{
"filename": "microsoft-jdk-11.0.13.8.1-linux-aarch64.tar.gz",
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-linux-aarch64.tar.gz"
}
]
}
]

View File

@ -0,0 +1,254 @@
[
{
"id": 10996,
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_05-8.1.0.10-linux.tar.gz",
"name": "zulu1.8.0_05-8.1.0.10-linux.tar.gz",
"zulu_version": [8, 1, 0, 10],
"jdk_version": [8, 0, 5, 13]
},
{
"id": 10997,
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_11-8.2.0.1-linux.tar.gz",
"name": "zulu1.8.0_11-8.2.0.1-linux.tar.gz",
"zulu_version": [8, 2, 0, 1],
"jdk_version": [8, 0, 11, 12]
},
{
"id": 10346,
"url": "https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-linux_x64.tar.gz",
"name": "zulu8.21.0.1-jdk8.0.131-linux_x64.tar.gz",
"zulu_version": [8, 21, 0, 1],
"jdk_version": [8, 0, 131, 11]
},
{
"id": 10362,
"url": "https://cdn.azul.com/zulu/bin/zulu8.23.0.3-jdk8.0.144-linux_x64.tar.gz",
"name": "zulu8.23.0.3-jdk8.0.144-linux_x64.tar.gz",
"zulu_version": [8, 23, 0, 3],
"jdk_version": [8, 0, 144, 1]
},
{
"id": 10399,
"url": "https://cdn.azul.com/zulu/bin/zulu8.25.0.1-jdk8.0.152-linux_x64.tar.gz",
"name": "zulu8.25.0.1-jdk8.0.152-linux_x64.tar.gz",
"zulu_version": [8, 25, 0, 1],
"jdk_version": [8, 0, 152, 16]
},
{
"id": 11355,
"url": "https://cdn.azul.com/zulu/bin/zulu8.46.0.19-ca-jdk8.0.252-linux_x64.tar.gz",
"name": "zulu8.46.0.19-ca-jdk8.0.252-linux_x64.tar.gz",
"zulu_version": [8, 46, 0, 19],
"jdk_version": [8, 0, 252, 14]
},
{
"id": 11481,
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.47-ca-jdk8.0.262-linux_x64.tar.gz",
"name": "zulu8.48.0.47-ca-jdk8.0.262-linux_x64.tar.gz",
"zulu_version": [8, 48, 0, 47],
"jdk_version": [8, 0, 262, 17]
},
{
"id": 11622,
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.51-ca-jdk8.0.262-linux_x64.tar.gz",
"name": "zulu8.48.0.51-ca-jdk8.0.262-linux_x64.tar.gz",
"zulu_version": [8, 48, 0, 51],
"jdk_version": [8, 0, 262, 19]
},
{
"id": 11535,
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.49-ca-jdk8.0.262-linux_x64.tar.gz",
"name": "zulu8.48.0.49-ca-jdk8.0.262-linux_x64.tar.gz",
"zulu_version": [8, 48, 0, 49],
"jdk_version": [8, 0, 262, 18]
},
{
"id": 12424,
"url": "https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-linux_x64.tar.gz",
"name": "zulu8.52.0.23-ca-jdk8.0.282-linux_x64.tar.gz",
"zulu_version": [8, 52, 0, 23],
"jdk_version": [8, 0, 282, 8]
},
{
"id": 10383,
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.0.15-jdk9.0.0-linux_x64.tar.gz",
"name": "zulu9.0.0.15-jdk9.0.0-linux_x64.tar.gz",
"zulu_version": [9, 0, 0, 15],
"jdk_version": [9, 0, 0, 0]
},
{
"id": 10413,
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.1.3-jdk9.0.1-linux_x64.tar.gz",
"name": "zulu9.0.1.3-jdk9.0.1-linux_x64.tar.gz",
"zulu_version": [9, 0, 1, 3],
"jdk_version": [9, 0, 1, 0]
},
{
"id": 10503,
"url": "https://cdn.azul.com/zulu/bin/zulu10.2+3-jdk10.0.1-linux_x64.tar.gz",
"name": "zulu10.2+3-jdk10.0.1-linux_x64.tar.gz",
"zulu_version": [10, 2, 3, 0],
"jdk_version": [10, 0, 1, 9]
},
{
"id": 10541,
"url": "https://cdn.azul.com/zulu/bin/zulu10.3+5-jdk10.0.2-linux_x64.tar.gz",
"name": "zulu10.3+5-jdk10.0.2-linux_x64.tar.gz",
"zulu_version": [10, 3, 5, 0],
"jdk_version": [10, 0, 2, 13]
},
{
"id": 10576,
"url": "https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz",
"name": "zulu11.2.3-jdk11.0.1-linux_x64.tar.gz",
"zulu_version": [11, 2, 3, 0],
"jdk_version": [11, 0, 1, 13]
},
{
"id": 10604,
"url": "https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz",
"name": "zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz",
"zulu_version": [11, 29, 3, 0],
"jdk_version": [11, 0, 2, 7]
},
{
"id": 10687,
"url": "https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz",
"name": "zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz",
"zulu_version": [11, 31, 11, 0],
"jdk_version": [11, 0, 3, 7]
},
{
"id": 10856,
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.13-ca-jdk11.0.5-linux_x64.tar.gz",
"name": "zulu11.35.13-ca-jdk11.0.5-linux_x64.tar.gz",
"zulu_version": [11, 35, 13, 0],
"jdk_version": [11, 0, 5, 10]
},
{
"id": 10933,
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.15-ca-jdk11.0.5-linux_x64.tar.gz",
"name": "zulu11.35.15-ca-jdk11.0.5-linux_x64.tar.gz",
"zulu_version": [11, 35, 15, 0],
"jdk_version": [11, 0, 5, 10]
},
{
"id": 10933,
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.11-ca-jdk11.0.5-linux_x64.tar.gz",
"name": "zulu11.35.15-ca-jdk11.0.5-linux_x64.tar.gz",
"zulu_version": [11, 35, 11, 0],
"jdk_version": [11, 0, 5, 10]
},
{
"id": 12397,
"url": "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz",
"name": "zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz",
"zulu_version": [11, 45, 27, 0],
"jdk_version": [11, 0, 10, 9]
},
{
"id": 10667,
"url": "https://cdn.azul.com/zulu/bin/zulu12.1.3-ca-jdk12.0.0-linux_x64.tar.gz",
"name": "zulu12.1.3-ca-jdk12.0.0-linux_x64.tar.gz",
"zulu_version": [12, 1, 3, 0],
"jdk_version": [12, 0, 0, 33]
},
{
"id": 10710,
"url": "https://cdn.azul.com/zulu/bin/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz",
"name": "zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz",
"zulu_version": [12, 2, 3, 0],
"jdk_version": [12, 0, 1, 12]
},
{
"id": 10780,
"url": "https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz",
"name": "zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz",
"zulu_version": [12, 3, 11, 0],
"jdk_version": [12, 0, 2, 3]
},
{
"id": 10846,
"url": "https://cdn.azul.com/zulu/bin/zulu13.27.9-ca-jdk13.0.0-linux_x64.tar.gz",
"name": "zulu13.27.9-ca-jdk13.0.0-linux_x64.tar.gz",
"zulu_version": [13, 27, 9, 0],
"jdk_version": [13, 0, 0, 33]
},
{
"id": 10888,
"url": "https://cdn.azul.com/zulu/bin/zulu13.28.11-ca-jdk13.0.1-linux_x64.tar.gz",
"name": "zulu13.28.11-ca-jdk13.0.1-linux_x64.tar.gz",
"zulu_version": [13, 28, 11, 0],
"jdk_version": [13, 0, 1, 10]
},
{
"id": 11073,
"url": "https://cdn.azul.com/zulu/bin/zulu13.29.9-ca-jdk13.0.2-linux_x64.tar.gz",
"name": "zulu13.29.9-ca-jdk13.0.2-linux_x64.tar.gz",
"zulu_version": [13, 29, 9, 0],
"jdk_version": [13, 0, 2, 6]
},
{
"id": 12408,
"url": "https://cdn.azul.com/zulu/bin/zulu13.37.21-ca-jdk13.0.6-linux_x64.tar.gz",
"name": "zulu13.37.21-ca-jdk13.0.6-linux_x64.tar.gz",
"zulu_version": [13, 37, 21, 0],
"jdk_version": [13, 0, 6, 5]
},
{
"id": 11236,
"url": "https://cdn.azul.com/zulu/bin/zulu14.27.1-ca-jdk14.0.0-linux_x64.tar.gz",
"name": "zulu14.27.1-ca-jdk14.0.0-linux_x64.tar.gz",
"zulu_version": [14, 27, 1, 0],
"jdk_version": [14, 0, 0, 36]
},
{
"id": 11349,
"url": "https://cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz",
"name": "zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz",
"zulu_version": [14, 28, 21, 0],
"jdk_version": [14, 0, 1, 8]
},
{
"id": 11513,
"url": "https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-linux_x64.tar.gz",
"name": "zulu14.29.23-ca-jdk14.0.2-linux_x64.tar.gz",
"zulu_version": [14, 29, 23, 0],
"jdk_version": [14, 0, 2, 12]
},
{
"id": 11780,
"url": "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz",
"name": "zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz",
"zulu_version": [15, 27, 17, 0],
"jdk_version": [15, 0, 0, 36]
},
{
"id": 11924,
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.13-ca-jdk15.0.1-linux_x64.tar.gz",
"name": "zulu15.28.13-ca-jdk15.0.1-linux_x64.tar.gz",
"zulu_version": [15, 28, 13, 0],
"jdk_version": [15, 0, 1, 8]
},
{
"id": 12101,
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.51-ca-jdk15.0.1-linux_x64.tar.gz",
"name": "zulu15.28.51-ca-jdk15.0.1-linux_x64.tar.gz",
"zulu_version": [15, 28, 51, 0],
"jdk_version": [15, 0, 1, 9]
},
{
"id": 12445,
"url": "https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-linux_x64.tar.gz",
"name": "zulu15.29.15-ca-jdk15.0.2-linux_x64.tar.gz",
"zulu_version": [15, 29, 15, 0],
"jdk_version": [15, 0, 2, 7]
},
{
"id": 12447,
"url": "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz",
"name": "zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz",
"zulu_version": [21, 32, 17, 0],
"jdk_version": [21, 0, 2, 6]
}
]

View File

@ -0,0 +1,254 @@
[
{
"id": 10996,
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_05-8.1.0.10-windows.tar.gz",
"name": "zulu1.8.0_05-8.1.0.10-windows.tar.gz",
"zulu_version": [8, 1, 0, 10],
"jdk_version": [8, 0, 5, 13]
},
{
"id": 10997,
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_11-8.2.0.1-windows.tar.gz",
"name": "zulu1.8.0_11-8.2.0.1-windows.tar.gz",
"zulu_version": [8, 2, 0, 1],
"jdk_version": [8, 0, 11, 12]
},
{
"id": 10346,
"url": "https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-windows_x64.tar.gz",
"name": "zulu8.21.0.1-jdk8.0.131-windows_x64.tar.gz",
"zulu_version": [8, 21, 0, 1],
"jdk_version": [8, 0, 131, 11]
},
{
"id": 10362,
"url": "https://cdn.azul.com/zulu/bin/zulu8.23.0.3-jdk8.0.144-windows_x64.tar.gz",
"name": "zulu8.23.0.3-jdk8.0.144-windows_x64.tar.gz",
"zulu_version": [8, 23, 0, 3],
"jdk_version": [8, 0, 144, 1]
},
{
"id": 10399,
"url": "https://cdn.azul.com/zulu/bin/zulu8.25.0.1-jdk8.0.152-windows_x64.tar.gz",
"name": "zulu8.25.0.1-jdk8.0.152-windows_x64.tar.gz",
"zulu_version": [8, 25, 0, 1],
"jdk_version": [8, 0, 152, 16]
},
{
"id": 11355,
"url": "https://cdn.azul.com/zulu/bin/zulu8.46.0.19-ca-jdk8.0.252-windows_x64.tar.gz",
"name": "zulu8.46.0.19-ca-jdk8.0.252-windows_x64.tar.gz",
"zulu_version": [8, 46, 0, 19],
"jdk_version": [8, 0, 252, 14]
},
{
"id": 11481,
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.47-ca-jdk8.0.262-windows_x64.tar.gz",
"name": "zulu8.48.0.47-ca-jdk8.0.262-windows_x64.tar.gz",
"zulu_version": [8, 48, 0, 47],
"jdk_version": [8, 0, 262, 17]
},
{
"id": 11622,
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.51-ca-jdk8.0.262-windows_x64.tar.gz",
"name": "zulu8.48.0.51-ca-jdk8.0.262-windows_x64.tar.gz",
"zulu_version": [8, 48, 0, 51],
"jdk_version": [8, 0, 262, 19]
},
{
"id": 11535,
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.49-ca-jdk8.0.262-windows_x64.tar.gz",
"name": "zulu8.48.0.49-ca-jdk8.0.262-windows_x64.tar.gz",
"zulu_version": [8, 48, 0, 49],
"jdk_version": [8, 0, 262, 18]
},
{
"id": 12424,
"url": "https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-windows_x64.tar.gz",
"name": "zulu8.52.0.23-ca-jdk8.0.282-windows_x64.tar.gz",
"zulu_version": [8, 52, 0, 23],
"jdk_version": [8, 0, 282, 8]
},
{
"id": 10383,
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.0.15-jdk9.0.0-windows_x64.tar.gz",
"name": "zulu9.0.0.15-jdk9.0.0-windows_x64.tar.gz",
"zulu_version": [9, 0, 0, 15],
"jdk_version": [9, 0, 0, 0]
},
{
"id": 10413,
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.1.3-jdk9.0.1-windows_x64.tar.gz",
"name": "zulu9.0.1.3-jdk9.0.1-windows_x64.tar.gz",
"zulu_version": [9, 0, 1, 3],
"jdk_version": [9, 0, 1, 0]
},
{
"id": 10503,
"url": "https://cdn.azul.com/zulu/bin/zulu10.2+3-jdk10.0.1-windows_x64.tar.gz",
"name": "zulu10.2+3-jdk10.0.1-windows_x64.tar.gz",
"zulu_version": [10, 2, 3, 0],
"jdk_version": [10, 0, 1, 9]
},
{
"id": 10541,
"url": "https://cdn.azul.com/zulu/bin/zulu10.3+5-jdk10.0.2-windows_x64.tar.gz",
"name": "zulu10.3+5-jdk10.0.2-windows_x64.tar.gz",
"zulu_version": [10, 3, 5, 0],
"jdk_version": [10, 0, 2, 13]
},
{
"id": 10576,
"url": "https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-windows_x64.tar.gz",
"name": "zulu11.2.3-jdk11.0.1-windows_x64.tar.gz",
"zulu_version": [11, 2, 3, 0],
"jdk_version": [11, 0, 1, 13]
},
{
"id": 10604,
"url": "https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk11.0.2-windows_x64.tar.gz",
"name": "zulu11.29.3-ca-jdk11.0.2-windows_x64.tar.gz",
"zulu_version": [11, 29, 3, 0],
"jdk_version": [11, 0, 2, 7]
},
{
"id": 10687,
"url": "https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-jdk11.0.3-windows_x64.tar.gz",
"name": "zulu11.31.11-ca-jdk11.0.3-windows_x64.tar.gz",
"zulu_version": [11, 31, 11, 0],
"jdk_version": [11, 0, 3, 7]
},
{
"id": 10856,
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.13-ca-jdk11.0.5-windows_x64.tar.gz",
"name": "zulu11.35.13-ca-jdk11.0.5-windows_x64.tar.gz",
"zulu_version": [11, 35, 13, 0],
"jdk_version": [11, 0, 5, 10]
},
{
"id": 10933,
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.15-ca-jdk11.0.5-windows_x64.tar.gz",
"name": "zulu11.35.15-ca-jdk11.0.5-windows_x64.tar.gz",
"zulu_version": [11, 35, 15, 0],
"jdk_version": [11, 0, 5, 10]
},
{
"id": 10933,
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.11-ca-jdk11.0.5-windows_x64.tar.gz",
"name": "zulu11.35.15-ca-jdk11.0.5-windows_x64.tar.gz",
"zulu_version": [11, 35, 11, 0],
"jdk_version": [11, 0, 5, 10]
},
{
"id": 12397,
"url": "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-windows_x64.tar.gz",
"name": "zulu11.45.27-ca-jdk11.0.10-windows_x64.tar.gz",
"zulu_version": [11, 45, 27, 0],
"jdk_version": [11, 0, 10, 9]
},
{
"id": 10667,
"url": "https://cdn.azul.com/zulu/bin/zulu12.1.3-ca-jdk12.0.0-windows_x64.tar.gz",
"name": "zulu12.1.3-ca-jdk12.0.0-windows_x64.tar.gz",
"zulu_version": [12, 1, 3, 0],
"jdk_version": [12, 0, 0, 33]
},
{
"id": 10710,
"url": "https://cdn.azul.com/zulu/bin/zulu12.2.3-ca-jdk12.0.1-windows_x64.tar.gz",
"name": "zulu12.2.3-ca-jdk12.0.1-windows_x64.tar.gz",
"zulu_version": [12, 2, 3, 0],
"jdk_version": [12, 0, 1, 12]
},
{
"id": 10780,
"url": "https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-windows_x64.tar.gz",
"name": "zulu12.3.11-ca-jdk12.0.2-windows_x64.tar.gz",
"zulu_version": [12, 3, 11, 0],
"jdk_version": [12, 0, 2, 3]
},
{
"id": 10846,
"url": "https://cdn.azul.com/zulu/bin/zulu13.27.9-ca-jdk13.0.0-windows_x64.tar.gz",
"name": "zulu13.27.9-ca-jdk13.0.0-windows_x64.tar.gz",
"zulu_version": [13, 27, 9, 0],
"jdk_version": [13, 0, 0, 33]
},
{
"id": 10888,
"url": "https://cdn.azul.com/zulu/bin/zulu13.28.11-ca-jdk13.0.1-windows_x64.tar.gz",
"name": "zulu13.28.11-ca-jdk13.0.1-windows_x64.tar.gz",
"zulu_version": [13, 28, 11, 0],
"jdk_version": [13, 0, 1, 10]
},
{
"id": 11073,
"url": "https://cdn.azul.com/zulu/bin/zulu13.29.9-ca-jdk13.0.2-windows_x64.tar.gz",
"name": "zulu13.29.9-ca-jdk13.0.2-windows_x64.tar.gz",
"zulu_version": [13, 29, 9, 0],
"jdk_version": [13, 0, 2, 6]
},
{
"id": 12408,
"url": "https://cdn.azul.com/zulu/bin/zulu13.37.21-ca-jdk13.0.6-windows_x64.tar.gz",
"name": "zulu13.37.21-ca-jdk13.0.6-windows_x64.tar.gz",
"zulu_version": [13, 37, 21, 0],
"jdk_version": [13, 0, 6, 5]
},
{
"id": 11236,
"url": "https://cdn.azul.com/zulu/bin/zulu14.27.1-ca-jdk14.0.0-windows_x64.tar.gz",
"name": "zulu14.27.1-ca-jdk14.0.0-windows_x64.tar.gz",
"zulu_version": [14, 27, 1, 0],
"jdk_version": [14, 0, 0, 36]
},
{
"id": 11349,
"url": "https://cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-windows_x64.tar.gz",
"name": "zulu14.28.21-ca-jdk14.0.1-windows_x64.tar.gz",
"zulu_version": [14, 28, 21, 0],
"jdk_version": [14, 0, 1, 8]
},
{
"id": 11513,
"url": "https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-windows_x64.tar.gz",
"name": "zulu14.29.23-ca-jdk14.0.2-windows_x64.tar.gz",
"zulu_version": [14, 29, 23, 0],
"jdk_version": [14, 0, 2, 12]
},
{
"id": 11780,
"url": "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-windows_x64.tar.gz",
"name": "zulu15.27.17-ca-jdk15.0.0-windows_x64.tar.gz",
"zulu_version": [15, 27, 17, 0],
"jdk_version": [15, 0, 0, 36]
},
{
"id": 11924,
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.13-ca-jdk15.0.1-windows_x64.tar.gz",
"name": "zulu15.28.13-ca-jdk15.0.1-windows_x64.tar.gz",
"zulu_version": [15, 28, 13, 0],
"jdk_version": [15, 0, 1, 8]
},
{
"id": 12101,
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.51-ca-jdk15.0.1-windows_x64.tar.gz",
"name": "zulu15.28.51-ca-jdk15.0.1-windows_x64.tar.gz",
"zulu_version": [15, 28, 51, 0],
"jdk_version": [15, 0, 1, 9]
},
{
"id": 12445,
"url": "https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-windows_x64.tar.gz",
"name": "zulu15.29.15-ca-jdk15.0.2-windows_x64.tar.gz",
"zulu_version": [15, 29, 15, 0],
"jdk_version": [15, 0, 2, 7]
},
{
"id": 12446,
"url": "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-windows_aarch64.zip",
"name": "zulu17.48.15-ca-jdk17.0.10-win_aarhc4.zip",
"zulu_version": [17, 48, 15, 0],
"jdk_version": [17, 0, 10, 7]
}
]

View File

@ -0,0 +1,257 @@
import {HttpClient} from '@actions/http-client';
import {DragonwellDistribution} from '../../src/distributions/dragonwell/installer';
import * as utils from '../../src/util';
import manifestData from '../data/dragonwell.json';
describe('getAvailableVersions', () => {
let spyHttpClient: jest.SpyInstance;
let spyUtilGetDownloadArchiveExtension: jest.SpyInstance;
beforeEach(() => {
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
spyHttpClient.mockReturnValue({
statusCode: 200,
headers: {},
result: manifestData
});
spyUtilGetDownloadArchiveExtension = jest.spyOn(
utils,
'getDownloadArchiveExtension'
);
spyUtilGetDownloadArchiveExtension.mockReturnValue('tar.gz');
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
jest.restoreAllMocks();
});
const mockPlatform = (
distribution: DragonwellDistribution,
platform: string
) => {
distribution['getPlatformOption'] = () => platform;
const mockedExtension = platform == 'windows' ? 'zip' : 'tar.gz';
spyUtilGetDownloadArchiveExtension.mockReturnValue(mockedExtension);
};
describe('getAvailableVersions', () => {
it.each([
['8', 'x86', 'linux', 0],
['8', 'aarch64', 'linux', 28],
['8.6.6', 'x64', 'linux', 31],
['8', 'x86', 'anolis', 0],
['8', 'x86', 'windows', 0],
['8', 'x86', 'mac', 0],
['11', 'x64', 'linux', 31],
['11', 'aarch64', 'linux', 28],
['17', 'riscv', 'linux', 3],
['16.0.1', 'x64', 'linux', 31],
['21', 'x64', 'linux', 31]
])(
'should get right number of available versions from JSON',
async (
jdkVersion: string,
arch: string,
platform: string,
len: number
) => {
const distribution = new DragonwellDistribution({
version: jdkVersion,
architecture: arch,
packageType: 'jdk',
checkLatest: false
});
mockPlatform(distribution, platform);
const availableVersions = await distribution['getAvailableVersions']();
expect(availableVersions).not.toBeNull();
expect(availableVersions.length).toBe(len);
}
);
});
describe('findPackageForDownload', () => {
it.each([
[
'8',
'linux',
'x64',
'https://github.com/alibaba/dragonwell8/releases/download/dragonwell-extended-8.13.14_jdk8u352-ga/Alibaba_Dragonwell_Extended_8.13.14_x64_linux.tar.gz'
],
[
'8',
'linux',
'aarch64',
'https://github.com/alibaba/dragonwell8/releases/download/dragonwell-extended-8.13.14_jdk8u352-ga/Alibaba_Dragonwell_Extended_8.13.14_aarch64_linux.tar.gz'
],
[
'8',
'windows',
'x64',
'https://github.com/alibaba/dragonwell8/releases/download/dragonwell-extended-8.13.14_jdk8u352-ga/Alibaba_Dragonwell_Extended_8.13.14_x64_windows.zip'
],
[
'8.13.14',
'linux',
'x64',
'https://github.com/alibaba/dragonwell8/releases/download/dragonwell-extended-8.13.14_jdk8u352-ga/Alibaba_Dragonwell_Extended_8.13.14_x64_linux.tar.gz'
],
[
'11',
'linux',
'x64',
'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux.tar.gz'
],
[
'11',
'linux',
'aarch64',
'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_aarch64_linux.tar.gz'
],
[
'11',
'linux',
'riscv',
'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_riscv64_linux.tar.gz'
],
[
'11',
'windows',
'x64',
'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_windows.zip'
],
[
'11',
'alpine-linux',
'x64',
'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_alpine-linux.tar.gz'
],
[
'11.0.17',
'linux',
'x64',
'https://github.com/alibaba/dragonwell11/releases/download/dragonwell-extended-11.0.17.13_jdk-11.0.17-ga/Alibaba_Dragonwell_Extended_11.0.17.13.8_x64_linux.tar.gz'
],
[
'17',
'linux',
'x64',
'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.5.0.5%2B8_jdk-17.0.5-ga/Alibaba_Dragonwell_Standard_17.0.5.0.5.8_x64_linux.tar.gz'
],
[
'17',
'linux',
'aarch64',
'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.5.0.5%2B8_jdk-17.0.5-ga/Alibaba_Dragonwell_Standard_17.0.5.0.5.8_aarch64_linux.tar.gz'
],
[
'17',
'windows',
'x64',
'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.5.0.5%2B8_jdk-17.0.5-ga/Alibaba_Dragonwell_Standard_17.0.5.0.5.8_x64_windows.zip'
],
[
'17',
'alpine-linux',
'x64',
'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.5.0.5%2B8_jdk-17.0.5-ga/Alibaba_Dragonwell_Standard_17.0.5.0.5.8_x64_alpine-linux.tar.gz'
],
[
'17.0.4',
'linux',
'x64',
'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.4.0.4%2B8_jdk-17.0.4-ga/Alibaba_Dragonwell_Standard_17.0.4.0.4%2B8_x64_linux.tar.gz'
],
[
'17.0.4+8',
'linux',
'x64',
'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.4.0.4%2B8_jdk-17.0.4-ga/Alibaba_Dragonwell_Standard_17.0.4.0.4%2B8_x64_linux.tar.gz'
],
[
'21',
'linux',
'aarch64',
'https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_aarch64_linux.tar.gz'
],
[
'21.0.3+9',
'linux',
'riscv',
'https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_riscv64_linux.tar.gz'
],
[
'21.0.1+12',
'linux',
'x64',
'https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.1.0.1%2B12_jdk-21.0.1-ga/Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_linux.tar.gz'
]
])(
'should return proper link according to the specified java-version, platform and arch',
async (
jdkVersion: string,
platform: string,
arch: string,
expectedLink: string
) => {
const distribution = new DragonwellDistribution({
version: jdkVersion,
architecture: arch,
packageType: 'jdk',
checkLatest: false
});
mockPlatform(distribution, platform);
const availableVersion = await distribution['findPackageForDownload'](
jdkVersion
);
expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink);
}
);
it.each([
['8', 'alpine-linux', 'x64'],
['8', 'macos', 'aarch64'],
['11', 'macos', 'aarch64'],
['17', 'linux', 'riscv']
])(
'should throw when required version of JDK can not be found in the JSON',
async (jdkVersion: string, platform: string, arch: string) => {
const distribution = new DragonwellDistribution({
version: jdkVersion,
architecture: arch,
packageType: 'jdk',
checkLatest: false
});
mockPlatform(distribution, platform);
await expect(
distribution['findPackageForDownload'](jdkVersion)
).rejects.toThrow(
`Couldn't find any satisfied version for the specified java-version: "${jdkVersion}" and architecture: "${arch}".`
);
}
);
it('should throw when required package type is not jdk', async () => {
const jdkVersion = '17';
const arch = 'x64';
const platform = 'linux';
const distribution = new DragonwellDistribution({
version: jdkVersion,
architecture: arch,
packageType: 'jre',
checkLatest: false
});
mockPlatform(distribution, platform);
await expect(
distribution['findPackageForDownload'](jdkVersion)
).rejects.toThrow('Dragonwell provides only the `jdk` package type');
});
});
});

View File

@ -0,0 +1,290 @@
import {LibericaDistributions} from '../../src/distributions/liberica/installer';
import {
ArchitectureOptions,
LibericaVersion
} from '../../src/distributions/liberica/models';
import {HttpClient} from '@actions/http-client';
import os from 'os';
import manifestData from '../data/liberica-linux.json';
describe('getAvailableVersions', () => {
let spyHttpClient: jest.SpyInstance;
beforeEach(() => {
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
spyHttpClient.mockReturnValue({
statusCode: 200,
headers: {},
result: manifestData as LibericaVersion[]
});
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
jest.restoreAllMocks();
});
it.each([
[
{
version: '11.x',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'bundle-type=jdk&bitness=32&arch=x86&build-type=all'
],
[
{
version: '11-ea',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'bundle-type=jdk&bitness=32&arch=x86&build-type=ea'
],
[
{
version: '16.0.2',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
},
'bundle-type=jdk&bitness=64&arch=x86&build-type=all'
],
[
{
version: '16.0.2',
architecture: 'x64',
packageType: 'jre',
checkLatest: false
},
'bundle-type=jre&bitness=64&arch=x86&build-type=all'
],
[
{
version: '8',
architecture: 'armv7',
packageType: 'jdk+fx',
checkLatest: false
},
'bundle-type=jdk-full&bitness=32&arch=arm&build-type=all'
],
[
{
version: '8',
architecture: 'aarch64',
packageType: 'jre+fx',
checkLatest: false
},
'bundle-type=jre-full&bitness=64&arch=arm&build-type=all'
]
])('build correct url for %s -> %s', async (input, urlParams) => {
const additionalParams =
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
'updateVersion%2CbuildVersion';
const distribution = new LibericaDistributions(input);
distribution['getPlatformOption'] = () => 'linux';
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=linux&${urlParams}${additionalParams}`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
});
type DistroArch = {
bitness: string;
arch: string;
};
it.each([
['amd64', {bitness: '64', arch: 'x86'}],
['arm64', {bitness: '64', arch: 'arm'}]
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new LibericaDistributions({
version: '17',
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
});
const additionalParams =
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
'updateVersion%2CbuildVersion';
distribution['getPlatformOption'] = () => 'linux';
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=linux&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
}
);
it('load available versions', async () => {
const distribution = new LibericaDistributions({
version: '11',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
});
const availableVersions = await distribution['getAvailableVersions']();
expect(availableVersions).toEqual(manifestData);
});
});
describe('getArchitectureOptions', () => {
it.each([
['x86', {bitness: '32', arch: 'x86'}],
['x64', {bitness: '64', arch: 'x86'}],
['armv7', {bitness: '32', arch: 'arm'}],
['aarch64', {bitness: '64', arch: 'arm'}],
['ppc64le', {bitness: '64', arch: 'ppc'}]
] as [string, ArchitectureOptions][])(
'parse architecture %s -> %s',
(input, expected) => {
const distributions = new LibericaDistributions({
architecture: input,
checkLatest: false,
packageType: '',
version: ''
});
expect(distributions['getArchitectureOptions']()).toEqual(expected);
}
);
it.each(['armv6', 's390x'])('not support architecture %s', input => {
const distributions = new LibericaDistributions({
architecture: input,
checkLatest: false,
packageType: '',
version: ''
});
expect(() => distributions['getArchitectureOptions']()).toThrow(
/Architecture '\w+' is not supported\. Supported architectures: .*/
);
});
});
describe('findPackageForDownload', () => {
let distribution: LibericaDistributions;
beforeEach(() => {
distribution = new LibericaDistributions({
version: '',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
});
it.each([
['8', '8.0.302+8'],
['11.x', '11.0.12+7'],
['8.0', '8.0.302+8'],
['11.0.x', '11.0.12+7'],
['15', '15.0.2+10'],
['15.0', '15.0.2+10'],
['15.0.0', '15.0.0+36'],
['8.0.232', '8.0.232+10'],
['8.0.232+9', '8.0.232+9'],
['15.0.2+8', '15.0.2+8'],
['15.0.2+10', '15.0.2+10']
])('version is %s -> %s', async (input, expected) => {
const result = await distribution['findPackageForDownload'](input);
expect(result.version).toBe(expected);
});
it('should throw an error', async () => {
await expect(distribution['findPackageForDownload']('18')).rejects.toThrow(
/Could not find satisfied version for semver */
);
});
});
describe('getPlatformOption', () => {
const distributions = new LibericaDistributions({
architecture: 'x64',
version: '11',
packageType: 'jdk',
checkLatest: false
});
it.each([
['linux', 'linux'],
['darwin', 'macos'],
['win32', 'windows'],
['cygwin', 'windows'],
['sunos', 'solaris']
])('os version %s -> %s', (input, expected) => {
const actual = distributions['getPlatformOption'](input as NodeJS.Platform);
expect(actual).toEqual(expected);
});
it.each(['aix', 'android', 'freebsd', 'openbsd', 'netbsd'])(
'not support os version %s',
input => {
expect(() =>
distributions['getPlatformOption'](input as NodeJS.Platform)
).toThrow(/Platform '\w+' is not supported\. Supported platforms: .+/);
}
);
});
describe('convertVersionToSemver', () => {
const distributions = new LibericaDistributions({
architecture: 'x64',
version: '11',
packageType: 'jdk',
checkLatest: false
});
it.each([
[
{
featureVersion: 11,
interimVersion: 0,
updateVersion: 12,
buildVersion: 7
},
'11.0.12+7'
],
[
{
featureVersion: 11,
interimVersion: 0,
updateVersion: 12,
buildVersion: 0
},
'11.0.12'
],
[
{
featureVersion: 11,
interimVersion: 0,
updateVersion: 0,
buildVersion: 13
},
'11.0.0+13'
]
])('%s -> %s', (input, expected) => {
const actual = distributions['convertVersionToSemver']({
downloadUrl: '',
version: '',
...input
});
expect(actual).toEqual(expected);
});
});

View File

@ -0,0 +1,290 @@
import {LibericaDistributions} from '../../src/distributions/liberica/installer';
import {
ArchitectureOptions,
LibericaVersion
} from '../../src/distributions/liberica/models';
import {HttpClient} from '@actions/http-client';
import os from 'os';
import manifestData from '../data/liberica-windows.json';
describe('getAvailableVersions', () => {
let spyHttpClient: jest.SpyInstance;
beforeEach(() => {
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
spyHttpClient.mockReturnValue({
statusCode: 200,
headers: {},
result: manifestData as LibericaVersion[]
});
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
jest.restoreAllMocks();
});
it.each([
[
{
version: '11.x',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'bundle-type=jdk&bitness=32&arch=x86&build-type=all'
],
[
{
version: '11-ea',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'bundle-type=jdk&bitness=32&arch=x86&build-type=ea'
],
[
{
version: '16.0.2',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
},
'bundle-type=jdk&bitness=64&arch=x86&build-type=all'
],
[
{
version: '16.0.2',
architecture: 'x64',
packageType: 'jre',
checkLatest: false
},
'bundle-type=jre&bitness=64&arch=x86&build-type=all'
],
[
{
version: '8',
architecture: 'armv7',
packageType: 'jdk+fx',
checkLatest: false
},
'bundle-type=jdk-full&bitness=32&arch=arm&build-type=all'
],
[
{
version: '8',
architecture: 'aarch64',
packageType: 'jre+fx',
checkLatest: false
},
'bundle-type=jre-full&bitness=64&arch=arm&build-type=all'
]
])('build correct url for %s -> %s', async (input, urlParams) => {
const additionalParams =
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
'updateVersion%2CbuildVersion';
const distribution = new LibericaDistributions(input);
distribution['getPlatformOption'] = () => 'windows';
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=windows&${urlParams}${additionalParams}`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
});
type DistroArch = {
bitness: string;
arch: string;
};
it.each([
['amd64', {bitness: '64', arch: 'x86'}],
['arm64', {bitness: '64', arch: 'arm'}]
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new LibericaDistributions({
version: '17',
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
});
const additionalParams =
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
'updateVersion%2CbuildVersion';
distribution['getPlatformOption'] = () => 'windows';
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=windows&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
}
);
it('load available versions', async () => {
const distribution = new LibericaDistributions({
version: '11',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
});
const availableVersions = await distribution['getAvailableVersions']();
expect(availableVersions).toEqual(manifestData);
});
});
describe('getArchitectureOptions', () => {
it.each([
['x86', {bitness: '32', arch: 'x86'}],
['x64', {bitness: '64', arch: 'x86'}],
['armv7', {bitness: '32', arch: 'arm'}],
['aarch64', {bitness: '64', arch: 'arm'}],
['ppc64le', {bitness: '64', arch: 'ppc'}]
] as [string, ArchitectureOptions][])(
'parse architecture %s -> %s',
(input, expected) => {
const distributions = new LibericaDistributions({
architecture: input,
checkLatest: false,
packageType: '',
version: ''
});
expect(distributions['getArchitectureOptions']()).toEqual(expected);
}
);
it.each(['armv6', 's390x'])('not support architecture %s', input => {
const distributions = new LibericaDistributions({
architecture: input,
checkLatest: false,
packageType: '',
version: ''
});
expect(() => distributions['getArchitectureOptions']()).toThrow(
/Architecture '\w+' is not supported\. Supported architectures: .*/
);
});
});
describe('findPackageForDownload', () => {
let distribution: LibericaDistributions;
beforeEach(() => {
distribution = new LibericaDistributions({
version: '',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
});
it.each([
['8', '8.0.302+8'],
['11.x', '11.0.12+7'],
['8.0', '8.0.302+8'],
['11.0.x', '11.0.12+7'],
['15', '15.0.2+10'],
['15.0', '15.0.2+10'],
['15.0.0', '15.0.0+36'],
['8.0.232', '8.0.232+10'],
['8.0.232+9', '8.0.232+9'],
['15.0.2+8', '15.0.2+8'],
['15.0.2+10', '15.0.2+10']
])('version is %s -> %s', async (input, expected) => {
const result = await distribution['findPackageForDownload'](input);
expect(result.version).toBe(expected);
});
it('should throw an error', async () => {
await expect(distribution['findPackageForDownload']('18')).rejects.toThrow(
/Could not find satisfied version for semver */
);
});
});
describe('getPlatformOption', () => {
const distributions = new LibericaDistributions({
architecture: 'x64',
version: '11',
packageType: 'jdk',
checkLatest: false
});
it.each([
['linux', 'linux'],
['darwin', 'macos'],
['win32', 'windows'],
['cygwin', 'windows'],
['sunos', 'solaris']
])('os version %s -> %s', (input, expected) => {
const actual = distributions['getPlatformOption'](input as NodeJS.Platform);
expect(actual).toEqual(expected);
});
it.each(['aix', 'android', 'freebsd', 'openbsd', 'netbsd'])(
'not support os version %s',
input => {
expect(() =>
distributions['getPlatformOption'](input as NodeJS.Platform)
).toThrow(/Platform '\w+' is not supported\. Supported platforms: .+/);
}
);
});
describe('convertVersionToSemver', () => {
const distributions = new LibericaDistributions({
architecture: 'x64',
version: '11',
packageType: 'jdk',
checkLatest: false
});
it.each([
[
{
featureVersion: 11,
interimVersion: 0,
updateVersion: 12,
buildVersion: 7
},
'11.0.12+7'
],
[
{
featureVersion: 11,
interimVersion: 0,
updateVersion: 12,
buildVersion: 0
},
'11.0.12'
],
[
{
featureVersion: 11,
interimVersion: 0,
updateVersion: 0,
buildVersion: 13
},
'11.0.0+13'
]
])('%s -> %s', (input, expected) => {
const actual = distributions['convertVersionToSemver']({
downloadUrl: '',
version: '',
...input
});
expect(actual).toEqual(expected);
});
});

View File

@ -1,6 +1,6 @@
import {MicrosoftDistributions} from '../../src/distributions/microsoft/installer';
import os from 'os';
import data from '../../src/distributions/microsoft/microsoft-openjdk-versions.json';
import data from '../data/microsoft.json';
import * as httpm from '@actions/http-client';
import * as core from '@actions/core';
@ -29,6 +29,11 @@ describe('findPackageForDownload', () => {
});
it.each([
[
'21.x',
'21.0.0',
'https://aka.ms/download-jdk/microsoft-jdk-21.0.0-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
],
[
'17.0.1',
'17.0.1+12.1',
@ -36,8 +41,8 @@ describe('findPackageForDownload', () => {
],
[
'17.x',
'17.0.3',
'https://aka.ms/download-jdk/microsoft-jdk-17.0.3-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
'17.0.7',
'https://aka.ms/download-jdk/microsoft-jdk-17.0.7-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
],
[
'16.0.x',
@ -53,6 +58,11 @@ describe('findPackageForDownload', () => {
'11.0.15',
'11.0.15',
'https://aka.ms/download-jdk/microsoft-jdk-11.0.15-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
],
[
'11.x',
'11.0.19',
'https://aka.ms/download-jdk/microsoft-jdk-11.0.19-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
]
])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => {
const result = await distribution['findPackageForDownload'](input);
@ -79,6 +89,30 @@ describe('findPackageForDownload', () => {
expect(result.url).toBe(url);
});
it.each([
['amd64', 'x64'],
['arm64', 'aarch64']
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest.spyOn(os, 'platform').mockReturnValue('darwin');
const version = '17';
const distro = new MicrosoftDistributions({
version,
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
});
const result = await distro['findPackageForDownload'](version);
const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-${distroArch}.tar.gz`;
expect(result.url).toBe(expectedUrl);
}
);
it.each([
['amd64', 'x64'],
['arm64', 'aarch64']
@ -97,7 +131,31 @@ describe('findPackageForDownload', () => {
});
const result = await distro['findPackageForDownload'](version);
const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.3-linux-${distroArch}.tar.gz`;
const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-${distroArch}.tar.gz`;
expect(result.url).toBe(expectedUrl);
}
);
it.each([
['amd64', 'x64'],
['arm64', 'aarch64']
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest.spyOn(os, 'platform').mockReturnValue('win32');
const version = '17';
const distro = new MicrosoftDistributions({
version,
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
});
const result = await distro['findPackageForDownload'](version);
const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-${distroArch}.zip`;
expect(result.url).toBe(expectedUrl);
}

View File

@ -2,10 +2,12 @@ import {OracleDistribution} from '../../src/distributions/oracle/installer';
import os from 'os';
import * as core from '@actions/core';
import {getDownloadArchiveExtension} from '../../src/util';
import {HttpClient} from '@actions/http-client';
describe('findPackageForDownload', () => {
let distribution: OracleDistribution;
let spyDebug: jest.SpyInstance;
let spyHttpClient: jest.SpyInstance;
beforeEach(() => {
distribution = new OracleDistribution({
@ -21,19 +23,24 @@ describe('findPackageForDownload', () => {
it.each([
[
'19',
'19',
'https://download.oracle.com/java/19/latest/jdk-19_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
'21',
'21',
'https://download.oracle.com/java/21/latest/jdk-21_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
],
[
'19.0.1',
'19.0.1',
'https://download.oracle.com/java/19/archive/jdk-19.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
'20',
'20',
'https://download.oracle.com/java/20/latest/jdk-20_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
],
[
'18.0.2.1',
'18.0.2.1',
'https://download.oracle.com/java/18/archive/jdk-18.0.2.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
'18',
'18',
'https://download.oracle.com/java/18/archive/jdk-18_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
],
[
'20.0.1',
'20.0.1',
'https://download.oracle.com/java/20/archive/jdk-20.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
],
[
'17',
@ -46,7 +53,33 @@ describe('findPackageForDownload', () => {
'https://download.oracle.com/java/17/archive/jdk-17.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
]
])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => {
/* Needed only for this particular test because some urls might change */
spyHttpClient = jest.spyOn(HttpClient.prototype, 'head');
spyHttpClient.mockReturnValue(
Promise.resolve({
message: {
statusCode: 200
}
})
);
/**
* NOTE - Should fail to retrieve 18 from latest and check archive instead
*/
if (input === '18') {
spyHttpClient.mockReturnValueOnce(
Promise.resolve({
message: {
statusCode: 404
}
})
);
}
const result = await distribution['findPackageForDownload'](input);
jest.restoreAllMocks();
expect(result.version).toBe(expectedVersion);
const osType = distribution.getPlatform();
const archiveType = getDownloadArchiveExtension();
@ -65,7 +98,7 @@ describe('findPackageForDownload', () => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest.spyOn(os, 'platform').mockReturnValue('linux');
const version = '17';
const version = '18';
const distro = new OracleDistribution({
version,
architecture: '', // to get default value
@ -79,10 +112,11 @@ describe('findPackageForDownload', () => {
}
const archiveType = getDownloadArchiveExtension();
const result = await distro['findPackageForDownload'](version);
const expectedUrl = `https://download.oracle.com/java/17/latest/jdk-17_${osType}-${distroArch}_bin.${archiveType}`;
const expectedUrl = `https://download.oracle.com/java/18/archive/jdk-18_${osType}-${distroArch}_bin.${archiveType}`;
expect(result.url).toBe(expectedUrl);
}
},
10000
);
it('should throw an error', async () => {
@ -92,8 +126,5 @@ describe('findPackageForDownload', () => {
await expect(distribution['findPackageForDownload']('11')).rejects.toThrow(
/Oracle JDK is only supported for JDK 17 and later/
);
await expect(distribution['findPackageForDownload']('18')).rejects.toThrow(
/Could not find Oracle JDK for SemVer */
);
});
});

View File

@ -0,0 +1,229 @@
import {HttpClient} from '@actions/http-client';
import * as semver from 'semver';
import {ZuluDistribution} from '../../src/distributions/zulu/installer';
import {IZuluVersions} from '../../src/distributions/zulu/models';
import * as utils from '../../src/util';
import os from 'os';
import manifestData from '../data/zulu-linux.json';
describe('getAvailableVersions', () => {
let spyHttpClient: jest.SpyInstance;
let spyUtilGetDownloadArchiveExtension: jest.SpyInstance;
beforeEach(() => {
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
spyHttpClient.mockReturnValue({
statusCode: 200,
headers: {},
result: manifestData as IZuluVersions[]
});
spyUtilGetDownloadArchiveExtension = jest.spyOn(
utils,
'getDownloadArchiveExtension'
);
spyUtilGetDownloadArchiveExtension.mockReturnValue('zip');
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
jest.restoreAllMocks();
});
it.each([
[
{
version: '11',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ga'
],
[
{
version: '11-ea',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ea'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jre',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jre&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jdk+fx',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jdk&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jre+fx',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jre&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
],
[
{
version: '11',
architecture: 'arm64',
packageType: 'jdk',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=64&release_status=ga'
],
[
{
version: '11',
architecture: 'arm',
packageType: 'jdk',
checkLatest: false
},
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=&release_status=ga'
]
])('build correct url for %s -> %s', async (input, parsedUrl) => {
const distribution = new ZuluDistribution(input);
distribution['getPlatformOption'] = () => 'linux';
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/${parsedUrl}`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
});
type DistroArch = {
bitness: string;
arch: string;
};
it.each([
['amd64', {bitness: '64', arch: 'x86'}],
['arm64', {bitness: '64', arch: 'arm'}]
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new ZuluDistribution({
version: '17',
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
});
distribution['getPlatformOption'] = () => 'linux';
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
}
);
it('load available versions', async () => {
const distribution = new ZuluDistribution({
version: '11',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
});
const availableVersions = await distribution['getAvailableVersions']();
expect(availableVersions).toHaveLength(manifestData.length);
});
});
describe('getArchitectureOptions', () => {
it.each([
[{architecture: 'x64'}, {arch: 'x86', hw_bitness: '64', abi: ''}],
[{architecture: 'x86'}, {arch: 'x86', hw_bitness: '32', abi: ''}],
[{architecture: 'x32'}, {arch: 'x32', hw_bitness: '', abi: ''}],
[{architecture: 'arm'}, {arch: 'arm', hw_bitness: '', abi: ''}]
])('%s -> %s', (input, expected) => {
const distribution = new ZuluDistribution({
version: '11',
architecture: input.architecture,
packageType: 'jdk',
checkLatest: false
});
expect(distribution['getArchitectureOptions']()).toEqual(expected);
});
});
describe('findPackageForDownload', () => {
it.each([
['8', '8.0.282+8'],
['11.x', '11.0.10+9'],
['8.0', '8.0.282+8'],
['11.0.x', '11.0.10+9'],
['15', '15.0.2+7'],
['9.0.0', '9.0.0+0'],
['9.0', '9.0.1+0'],
['8.0.262', '8.0.262+19'], // validate correct choice between [8.0.262.17, 8.0.262.19, 8.0.262.18]
['8.0.262+17', '8.0.262+17'],
['15.0.1+8', '15.0.1+8'],
['15.0.1+9', '15.0.1+9']
])('version is %s -> %s', async (input, expected) => {
const distribution = new ZuluDistribution({
version: input,
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
const result = await distribution['findPackageForDownload'](
distribution['version']
);
expect(result.version).toBe(expected);
});
it('select correct bundle if there are multiple items with the same jdk version but different zulu versions', async () => {
const distribution = new ZuluDistribution({
version: '',
architecture: 'arm64',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
const result = await distribution['findPackageForDownload']('21.0.2');
expect(result.url).toBe(
'https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz'
);
});
it('should throw an error', async () => {
const distribution = new ZuluDistribution({
version: '18',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
await expect(
distribution['findPackageForDownload'](distribution['version'])
).rejects.toThrow(/Could not find satisfied version for semver */);
});
});

View File

@ -0,0 +1,229 @@
import {HttpClient} from '@actions/http-client';
import * as semver from 'semver';
import {ZuluDistribution} from '../../src/distributions/zulu/installer';
import {IZuluVersions} from '../../src/distributions/zulu/models';
import * as utils from '../../src/util';
import os from 'os';
import manifestData from '../data/zulu-windows.json';
describe('getAvailableVersions', () => {
let spyHttpClient: jest.SpyInstance;
let spyUtilGetDownloadArchiveExtension: jest.SpyInstance;
beforeEach(() => {
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
spyHttpClient.mockReturnValue({
statusCode: 200,
headers: {},
result: manifestData as IZuluVersions[]
});
spyUtilGetDownloadArchiveExtension = jest.spyOn(
utils,
'getDownloadArchiveExtension'
);
spyUtilGetDownloadArchiveExtension.mockReturnValue('zip');
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
jest.restoreAllMocks();
});
it.each([
[
{
version: '11',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ga'
],
[
{
version: '11-ea',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ea'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jdk',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jre',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jre&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jdk+fx',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jdk&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
],
[
{
version: '8',
architecture: 'x64',
packageType: 'jre+fx',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jre&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
],
[
{
version: '11',
architecture: 'arm64',
packageType: 'jdk',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=64&release_status=ga'
],
[
{
version: '11',
architecture: 'arm',
packageType: 'jdk',
checkLatest: false
},
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=&release_status=ga'
]
])('build correct url for %s -> %s', async (input, parsedUrl) => {
const distribution = new ZuluDistribution(input);
distribution['getPlatformOption'] = () => 'windows';
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/${parsedUrl}`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
});
type DistroArch = {
bitness: string;
arch: string;
};
it.each([
['amd64', {bitness: '64', arch: 'x86'}],
['arm64', {bitness: '64', arch: 'arm'}]
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
const distribution = new ZuluDistribution({
version: '17',
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
});
distribution['getPlatformOption'] = () => 'windows';
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`;
await distribution['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
}
);
it('load available versions', async () => {
const distribution = new ZuluDistribution({
version: '11',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
});
const availableVersions = await distribution['getAvailableVersions']();
expect(availableVersions).toHaveLength(manifestData.length);
});
});
describe('getArchitectureOptions', () => {
it.each([
[{architecture: 'x64'}, {arch: 'x86', hw_bitness: '64', abi: ''}],
[{architecture: 'x86'}, {arch: 'x86', hw_bitness: '32', abi: ''}],
[{architecture: 'x32'}, {arch: 'x32', hw_bitness: '', abi: ''}],
[{architecture: 'arm'}, {arch: 'arm', hw_bitness: '', abi: ''}]
])('%s -> %s', (input, expected) => {
const distribution = new ZuluDistribution({
version: '11',
architecture: input.architecture,
packageType: 'jdk',
checkLatest: false
});
expect(distribution['getArchitectureOptions']()).toEqual(expected);
});
});
describe('findPackageForDownload', () => {
it.each([
['8', '8.0.282+8'],
['11.x', '11.0.10+9'],
['8.0', '8.0.282+8'],
['11.0.x', '11.0.10+9'],
['15', '15.0.2+7'],
['9.0.0', '9.0.0+0'],
['9.0', '9.0.1+0'],
['8.0.262', '8.0.262+19'], // validate correct choice between [8.0.262.17, 8.0.262.19, 8.0.262.18]
['8.0.262+17', '8.0.262+17'],
['15.0.1+8', '15.0.1+8'],
['15.0.1+9', '15.0.1+9']
])('version is %s -> %s', async (input, expected) => {
const distribution = new ZuluDistribution({
version: input,
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
const result = await distribution['findPackageForDownload'](
distribution['version']
);
expect(result.version).toBe(expected);
});
it('select correct bundle if there are multiple items with the same jdk version but different zulu versions', async () => {
const distribution = new ZuluDistribution({
version: '',
architecture: 'arm64',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
const result = await distribution['findPackageForDownload']('17.0.10');
expect(result.url).toBe(
'https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-windows_aarch64.zip'
);
});
it('should throw an error', async () => {
const distribution = new ZuluDistribution({
version: '18',
architecture: 'x86',
packageType: 'jdk',
checkLatest: false
});
distribution['getAvailableVersions'] = async () => manifestData;
await expect(
distribution['findPackageForDownload'](distribution['version'])
).rejects.toThrow(/Could not find satisfied version for semver */);
});
});

View File

@ -77,9 +77,9 @@ describe('toolchains tests', () => {
};
const result = `<?xml version="1.0"?>
<toolchains xmlns="https://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
<type>jdk</type>
<provides>
@ -248,9 +248,9 @@ describe('toolchains tests', () => {
};
const expectedToolchains = `<?xml version="1.0"?>
<toolchains xmlns="https://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
<type>jdk</type>
<provides>

View File

@ -56,6 +56,9 @@ inputs:
cache:
description: 'Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".'
required: false
cache-dependency-path:
description: 'The path to a dependency file: pom.xml, build.gradle, build.sbt, etc. This option can be used with the `cache` option. If this option is omitted, the action searches for the dependency file in the entire repository. This option supports wildcards and a list of file names for caching multiple dependencies.'
required: false
job-status:
description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting'
default: ${{ job.status }}
@ -78,6 +81,6 @@ outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key'
runs:
using: 'node16'
using: 'node20'
main: 'dist/setup/index.js'
post: 'dist/cleanup/index.js'

38770
dist/cleanup/index.js vendored

File diff suppressed because one or more lines are too long

86029
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -7,6 +7,7 @@
- [Microsoft](#Microsoft)
- [Amazon Corretto](#Amazon-Corretto)
- [Oracle](#Oracle)
- [Alibaba Dragonwell](#Alibaba-Dragonwell)
- [Installing custom Java package type](#Installing-custom-Java-package-type)
- [Installing custom Java architecture](#Installing-custom-Java-architecture)
- [Installing custom Java distribution from local file](#Installing-Java-from-local-file)
@ -24,13 +25,14 @@ See [action.yml](../action.yml) for more details on task inputs.
Inputs `java-version` and `distribution` are mandatory and needs to be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
### Eclipse Temurin
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
- run: java -cp java HelloWorldApp
```
@ -39,8 +41,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt-hotspot'
java-version: '11'
@ -48,37 +50,40 @@ steps:
```
### Zulu
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '21'
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
- run: java -cp java HelloWorldApp
```
### Liberica
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '11'
java-version: '21'
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
- run: java -cp java HelloWorldApp
```
### Microsoft
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '11'
java-version: '21'
- run: java -cp java HelloWorldApp
```
@ -89,11 +94,11 @@ steps:
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action:
```yaml
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
token: ${{ secrets.GH_DOTCOM_TOKEN }}
distribution: 'microsoft'
java-version: '11'
java-version: '21'
```
If the runner is not able to access github.com, any Java versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information.
@ -103,11 +108,11 @@ If the runner is not able to access github.com, any Java versions requested duri
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '11'
java-version: '21'
- run: java -cp java HelloWorldApp
```
@ -116,19 +121,32 @@ steps:
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'
java-version: '21'
- run: java -cp java HelloWorldApp
```
### Alibaba Dragonwell
**NOTE:** Alibaba Dragonwell only provides jdk.
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'dragonwell'
java-version: '8'
- run: java -cp java HelloWorldApp
```
## Installing custom Java package type
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@ -141,8 +159,8 @@ steps:
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@ -158,7 +176,7 @@ steps:
- run: |
download_url="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@ -168,6 +186,31 @@ steps:
- run: java -cp java HelloWorldApp
```
If your use-case requires a custom distribution (in the example, alpine-linux is used) or a version that is not provided by setup-java and you want to always install the latest version during runtime, then you can use the following code to auto-download the latest JDK, determine the semver needed for setup-java, and setup-java will take care of the installation and caching on the VM:
```yaml
steps:
- name: fetch latest temurin JDK
id: fetch_latest_jdk
run: |
major_version={{ env.JAVA_VERSION }} # Example 16 or 21 or 22
cd $RUNNER_TEMP
response=$(curl -s "https://api.github.com/repos/adoptium/temurin${major_version}-binaries/releases")
latest_jdk_download_url=$(echo "$response" | jq -r '.[0].assets[] | select(.name | contains("jdk_x64_alpine-linux") and endswith(".tar.gz")) | .browser_download_url')
curl -Ls "$latest_jdk_download_url" -o java_package.tar.gz
latest_jdk_json_url=$(jdk_download_url "$response" | jq -r '.[0].assets[] | select(.name | contains("jdk_x64_alpine-linux") and endswith(".tar.gz.json")) | .browser_download_url')
latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver')
echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT"
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
java-version: {{ steps.fetch_latest_jdk.outputs.java_version }}
architecture: x64
- run: java -cp java HelloWorldApp
```
## Testing against different Java distributions
**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.
```yaml
@ -180,9 +223,9 @@ jobs:
java: [ '8', '11' ]
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
@ -200,9 +243,9 @@ jobs:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
@ -217,9 +260,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@ -233,7 +276,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '11'
@ -318,6 +361,8 @@ If `gpg-private-key` input is provided, the private key will be written to a fil
See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file.
***NOTE***: If the error that states, `gpg: Sorry, no terminal at all requested - can't get input` [is encountered](https://github.com/actions/setup-java/issues/554), please update the version of `maven-gpg-plugin` to 1.6 or higher.
## Apache Maven with a settings path
When using an Actions self-hosted runner with multiple shared runners the default `$HOME` directory can be shared by a number runners at the same time which could overwrite existing settings file. Setting the `settings-path` variable allows you to choose a unique location for your settings file.
@ -328,9 +373,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11 for Shared Runner
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@ -354,10 +399,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: '11'
@ -391,17 +436,17 @@ Subsequent calls to `setup-java` with distinct distribution and version paramete
```yaml
steps:
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |
8
11
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: 15
java-version: '15'
```
The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combine this with custom JDKs of arbitrary versions:
@ -410,7 +455,7 @@ The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combi
- run: |
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@ -418,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.
@ -427,7 +472,7 @@ Each JDK provider will receive a default `vendor` using the `distribution` input
- run: |
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@ -442,7 +487,7 @@ In case you install multiple versions of Java at once with multi-line `java-vers
```yaml
steps:
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |
@ -456,8 +501,8 @@ Each JDK provider will receive a default `id` based on the combination of `distr
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
@ -469,7 +514,7 @@ In case you install multiple versions of Java at once you can use the same synta
```yaml
steps:
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: '<distribution>'
java-version: |
@ -480,14 +525,21 @@ steps:
something_other
```
## Java-version file
If the `java-version-file` input is specified, the action will try to extract the version from the file and install it.
Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv).
## Java version file
If the `java-version-file` input is specified, the action will extract the version from the file and install it.
Supported files are .java-version and .tool-versions.
In .java-version file, only the version should be specified (e.g., 17.0.7).
In .tool-versions file, java version should be preceded by the java keyword (e.g., java 17.0.7).
The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv). Similarly, the `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning ([semver](https://semver.org/)).
If both java-version and java-version-file inputs are provided, the java-version input will be used.
Valid entry options:
```
major versions: 8, 11, 16, 17
more specific versions: 1.8.0.2, 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8
early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea
major versions: 8, 11, 16, 17, 21
more specific versions: 8.0.282+8, 8.0.232, 11.0, 11.0.4, 17.0
early access (EA) versions: 15-ea, 15.0.0-ea
versions with specified distribution: openjdk64-11.0.2
```
If the file contains multiple versions, only the first one will be recognized.

8654
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "setup-java",
"version": "3.4.1",
"version": "4.0.0",
"private": true,
"description": "setup java action",
"main": "dist/setup/index.js",
@ -26,30 +26,35 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^3.0.4",
"@actions/cache": "^3.2.4",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.0.4",
"@actions/glob": "^0.2.0",
"@actions/http-client": "^1.0.11",
"@actions/glob": "^0.4.0",
"@actions/http-client": "^2.2.1",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.6.1",
"semver": "^7.3.4",
"@actions/tool-cache": "^2.0.1",
"semver": "^7.6.0",
"xmlbuilder2": "^2.4.0"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^16.11.25",
"@types/semver": "^7.3.4",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.24",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.33.4",
"eslint": "^8.35.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^27.2.1",
"jest": "^27.2.5",
"jest-circus": "^27.2.5",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"prettier": "^2.8.4",
"ts-jest": "^27.0.5",
"typescript": "^4.2.3"
}
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
},
"bugs": {
"url": "https://github.com/actions/setup-java/issues"
},
"homepage": "https://github.com/actions/setup-java#readme"
}

View File

@ -39,7 +39,8 @@ const supportedPackageManager: PackageManager[] = [
'**/gradle-wrapper.properties',
'buildSrc/**/Versions.kt',
'buildSrc/**/Dependencies.kt',
'gradle/*.versions.toml'
'gradle/*.versions.toml',
'**/versions.properties'
]
},
{
@ -82,31 +83,34 @@ function findPackageManager(id: string): PackageManager {
/**
* A function that generates a cache key to use.
* Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"".
* If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-).
* @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key}
*/
async function computeCacheKey(packageManager: PackageManager) {
const hash = await glob.hashFiles(packageManager.pattern.join('\n'));
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${hash}`;
async function computeCacheKey(
packageManager: PackageManager,
cacheDependencyPath: string
) {
const pattern = cacheDependencyPath
? cacheDependencyPath.trim().split('\n')
: packageManager.pattern;
const fileHash = await glob.hashFiles(pattern.join('\n'));
if (!fileHash) {
throw new Error(
`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`
);
}
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
}
/**
* Restore the dependency cache
* @param id ID of the package manager, should be "maven" or "gradle"
* @param cacheDependencyPath The path to a dependency file
*/
export async function restore(id: string) {
export async function restore(id: string, cacheDependencyPath: string) {
const packageManager = findPackageManager(id);
const primaryKey = await computeCacheKey(packageManager);
const primaryKey = await computeCacheKey(packageManager, cacheDependencyPath);
core.debug(`primary key is ${primaryKey}`);
core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
if (primaryKey.endsWith('-')) {
throw new Error(
`No file in ${process.cwd()} matched to [${
packageManager.pattern
}], make sure you have checked out the target repository`
);
}
// No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
const matchedKey = await cache.restoreCache(packageManager.path, primaryKey);
@ -145,10 +149,12 @@ export async function save(id: string) {
await cache.saveCache(packageManager.path, primaryKey);
core.info(`Cache saved with the key: ${primaryKey}`);
} catch (error) {
if (error.name === cache.ReserveCacheError.name) {
core.info(error.message);
const err = error as Error;
if (err.name === cache.ReserveCacheError.name) {
core.info(err.message);
} else {
if (isProbablyGradleDaemonProblem(packageManager, error)) {
if (isProbablyGradleDaemonProblem(packageManager, err)) {
core.warning(
'Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'
);

View File

@ -13,7 +13,9 @@ async function removePrivateKeyFromKeychain() {
);
await gpg.deleteKey(keyFingerprint);
} catch (error) {
core.setFailed(`Failed to remove private key due to: ${error.message}`);
core.setFailed(
`Failed to remove private key due to: ${(error as Error).message}`
);
}
}
}

View File

@ -18,6 +18,7 @@ export const INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined;
export const INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
export const INPUT_CACHE = 'cache';
export const INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path';
export const INPUT_JOB_STATUS = 'job-status';
export const STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint';

View File

@ -93,7 +93,7 @@ export class CorrettoDistribution extends JavaBase {
const imageType = this.packageType;
if (core.isDebug()) {
console.time('Retrieving available versions for Coretto took'); // eslint-disable-line no-console
console.time('Retrieving available versions for Corretto took'); // eslint-disable-line no-console
}
const availableVersionsUrl =
@ -116,7 +116,7 @@ export class CorrettoDistribution extends JavaBase {
if (core.isDebug()) {
core.startGroup('Print information about available versions');
console.timeEnd('Retrieving available versions for Coretto took'); // eslint-disable-line no-console
console.timeEnd('Retrieving available versions for Corretto took'); // eslint-disable-line no-console
core.debug(`Available versions: [${availableVersions.length}]`);
core.debug(
availableVersions

View File

@ -9,6 +9,7 @@ import {MicrosoftDistributions} from './microsoft/installer';
import {SemeruDistribution} from './semeru/installer';
import {CorrettoDistribution} from './corretto/installer';
import {OracleDistribution} from './oracle/installer';
import {DragonwellDistribution} from './dragonwell/installer';
enum JavaDistribution {
Adopt = 'adopt',
@ -21,7 +22,8 @@ enum JavaDistribution {
Microsoft = 'microsoft',
Semeru = 'semeru',
Corretto = 'corretto',
Oracle = 'oracle'
Oracle = 'oracle',
Dragonwell = 'dragonwell'
}
export function getJavaDistribution(
@ -60,6 +62,8 @@ export function getJavaDistribution(
return new CorrettoDistribution(installerOptions);
case JavaDistribution.Oracle:
return new OracleDistribution(installerOptions);
case JavaDistribution.Dragonwell:
return new DragonwellDistribution(installerOptions);
default:
return null;
}

View File

@ -0,0 +1,249 @@
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
import semver from 'semver';
import fs from 'fs';
import path from 'path';
import {JavaBase} from '../base-installer';
import {
convertVersionToSemver,
extractJdkFile,
getDownloadArchiveExtension,
getGitHubHttpHeaders,
isVersionSatisfies
} from '../../util';
import {IDragonwellVersions, IDragonwellAllVersions} from './models';
import {
JavaDownloadRelease,
JavaInstallerOptions,
JavaInstallerResults
} from '../base-models';
export class DragonwellDistribution extends JavaBase {
constructor(installerOptions: JavaInstallerOptions) {
super('Dragonwell', installerOptions);
}
protected async findPackageForDownload(
version: string
): Promise<JavaDownloadRelease> {
if (!this.stable) {
throw new Error('Early access versions are not supported by Dragonwell');
}
if (this.packageType !== 'jdk') {
throw new Error('Dragonwell provides only the `jdk` package type');
}
const availableVersions = await this.getAvailableVersions();
const matchedVersions = availableVersions
.filter(item => {
return isVersionSatisfies(version, item.jdk_version);
})
.map(item => {
return {
version: item.jdk_version,
url: item.download_link
} as JavaDownloadRelease;
});
if (!matchedVersions.length) {
throw new Error(
`Couldn't find any satisfied version for the specified java-version: "${version}" and architecture: "${this.architecture}".`
);
}
const resolvedVersion = matchedVersions[0];
return resolvedVersion;
}
private async getAvailableVersions(): Promise<IDragonwellVersions[]> {
const platform = this.getPlatformOption();
const arch = this.distributionArchitecture();
let fetchedDragonwellJson = await this.fetchJsonFromPrimaryUrl();
if (!fetchedDragonwellJson) {
fetchedDragonwellJson = await this.fetchJsonFromBackupUrl();
}
if (!fetchedDragonwellJson) {
throw new Error(
`Couldn't fetch Dragonwell versions information from both primary and backup urls`
);
}
core.debug(
'Successfully fetched information about available Dragonwell versions'
);
const availableVersions = this.parseVersions(
platform,
arch,
fetchedDragonwellJson
);
if (core.isDebug()) {
core.startGroup('Print information about available versions');
core.debug(availableVersions.map(item => item.jdk_version).join(', '));
core.endGroup();
}
return availableVersions;
}
protected async downloadTool(
javaRelease: JavaDownloadRelease
): Promise<JavaInstallerResults> {
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
const javaArchivePath = await tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extractedJavaPath = await extractJdkFile(
javaArchivePath,
getDownloadArchiveExtension()
);
const archiveName = fs.readdirSync(extractedJavaPath)[0];
const archivePath = path.join(extractedJavaPath, archiveName);
const version = this.getToolcacheVersionName(javaRelease.version);
const javaPath = await tc.cacheDir(
archivePath,
this.toolcacheFolderName,
version,
this.architecture
);
return {version: javaRelease.version, path: javaPath};
}
private parseVersions(
platform: string,
arch: string,
dragonwellVersions: IDragonwellAllVersions
): IDragonwellVersions[] {
const eligibleVersions: IDragonwellVersions[] = [];
for (const majorVersion in dragonwellVersions) {
const majorVersionMap = dragonwellVersions[majorVersion];
for (let jdkVersion in majorVersionMap) {
const jdkVersionMap = majorVersionMap[jdkVersion];
if (!(platform in jdkVersionMap)) {
continue;
}
const platformMap = jdkVersionMap[platform];
if (!(arch in platformMap)) {
continue;
}
const archMap = platformMap[arch];
if (jdkVersion === 'latest') {
continue;
}
// Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits).
// Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools.
const jdkVersionNums: string[] = jdkVersion
.replace('+', '.')
.split('.');
jdkVersion = convertVersionToSemver(
`${jdkVersionNums.slice(0, 3).join('.')}.${
jdkVersionNums[jdkVersionNums.length - 1]
}`
);
for (const edition in archMap) {
eligibleVersions.push({
os: platform,
architecture: arch,
jdk_version: jdkVersion,
checksum: archMap[edition].sha256 ?? '',
download_link: archMap[edition].download_url,
edition: edition,
image_type: 'jdk'
});
break; // Get the first available link to the JDK. In most cases it should point to the Extended version of JDK, in rare cases like with v17 it points to the Standard version (the only available).
}
}
}
const sortedVersions = this.sortParsedVersions(eligibleVersions);
return sortedVersions;
}
// Sorts versions in descending order as by default data in JSON isn't sorted
private sortParsedVersions(
eligibleVersions: IDragonwellVersions[]
): IDragonwellVersions[] {
const sortedVersions = eligibleVersions.sort((versionObj1, versionObj2) => {
const version1 = versionObj1.jdk_version;
const version2 = versionObj2.jdk_version;
return semver.compareBuild(version1, version2);
});
return sortedVersions.reverse();
}
private getPlatformOption(): string {
switch (process.platform) {
case 'win32':
return 'windows';
default:
return process.platform;
}
}
private async fetchJsonFromPrimaryUrl(): Promise<IDragonwellAllVersions | null> {
const primaryUrl = 'https://dragonwell-jdk.io/map_with_checksum.json';
try {
core.debug(
`Trying to fetch available Dragonwell versions info from the primary url: ${primaryUrl}`
);
const fetchedDragonwellJson = (
await this.http.getJson<IDragonwellAllVersions>(primaryUrl)
).result;
return fetchedDragonwellJson;
} catch (err) {
core.debug(
`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${
(err as Error).message
}`
);
return null;
}
}
private async fetchJsonFromBackupUrl(): Promise<IDragonwellAllVersions | null> {
const owner = 'dragonwell-releng';
const repository = 'dragonwell-setup-java';
const branch = 'main';
const filePath = 'releases.json';
const backupUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`;
const headers = getGitHubHttpHeaders();
try {
core.debug(
`Trying to fetch available Dragonwell versions info from the backup url: ${backupUrl}`
);
const fetchedDragonwellJson = (
await this.http.getJson<IDragonwellAllVersions>(backupUrl, headers)
).result;
return fetchedDragonwellJson;
} catch (err) {
core.debug(
`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${
(err as Error).message
}`
);
return null;
}
}
}

View File

@ -0,0 +1,26 @@
export interface IDragonwellAllVersions {
[major: string]: {
[jdk_version: string]: {
[os: string]: {
[arch: string]: {
[edition: string]: {
content_type: string;
sha256: string;
name: string;
download_url: string;
};
};
};
};
};
}
export interface IDragonwellVersions {
os: string;
architecture: string;
jdk_version: string;
checksum: string;
download_link: string;
edition: string;
image_type: string;
}

View File

@ -31,10 +31,18 @@ export class LibericaDistributions extends JavaBase {
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
const javaArchivePath = await tc.downloadTool(javaRelease.url);
let javaArchivePath = await tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
if (
process.platform === 'win32' &&
(this.architecture === 'arm64' || this.architecture === 'aarch64')
) {
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
javaArchivePath = javaArchivePathRenamed;
}
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
const archiveName = fs.readdirSync(extractedJavaPath)[0];

View File

@ -4,13 +4,16 @@ import {
JavaInstallerOptions,
JavaInstallerResults
} from '../base-models';
import {extractJdkFile, getDownloadArchiveExtension} from '../../util';
import {
extractJdkFile,
getDownloadArchiveExtension,
getGitHubHttpHeaders
} from '../../util';
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
import {OutgoingHttpHeaders} from 'http';
import fs from 'fs';
import path from 'path';
import {ITypedResponse} from '@actions/http-client/interfaces';
import {TypedResponse} from '@actions/http-client/lib/interfaces';
export class MicrosoftDistributions extends JavaBase {
constructor(installerOptions: JavaInstallerOptions) {
@ -23,7 +26,20 @@ export class MicrosoftDistributions extends JavaBase {
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
const javaArchivePath = await tc.downloadTool(javaRelease.url);
let javaArchivePath = await tc.downloadTool(javaRelease.url);
// 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`;
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
javaArchivePath = javaArchivePathRenamed;
}
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
@ -85,8 +101,6 @@ export class MicrosoftDistributions extends JavaBase {
private async getAvailableVersions(): Promise<tc.IToolRelease[] | null> {
// TODO get these dynamically!
// We will need Microsoft to add an endpoint where we can query for versions.
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const owner = 'actions';
const repository = 'setup-java';
const branch = 'main';
@ -96,12 +110,9 @@ export class MicrosoftDistributions extends JavaBase {
let releases: tc.IToolRelease[] | null = null;
const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`;
const headers: OutgoingHttpHeaders = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw'
};
const headers = getGitHubHttpHeaders();
let response: ITypedResponse<tc.IToolRelease[]> | null = null;
let response: TypedResponse<tc.IToolRelease[]> | null = null;
if (core.isDebug()) {
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console

File diff suppressed because it is too large Load Diff

View File

@ -65,33 +65,48 @@ export class OracleDistribution extends JavaBase {
const platform = this.getPlatform();
const extension = getDownloadArchiveExtension();
let major;
let fileUrl;
if (range.includes('.')) {
major = range.split('.')[0];
fileUrl = `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`;
} else {
major = range;
fileUrl = `${ORACLE_DL_BASE}/${range}/latest/jdk-${range}_${platform}-${arch}_bin.${extension}`;
const isOnlyMajorProvided = !range.includes('.');
const major = isOnlyMajorProvided ? range : range.split('.')[0];
const possibleUrls: string[] = [];
/**
* NOTE
* If only major version was provided we will check it under /latest first
* in order to retrieve the latest possible version if possible,
* otherwise we will fall back to /archive where we are guaranteed to
* find any version if it exists
*/
if (isOnlyMajorProvided) {
possibleUrls.push(
`${ORACLE_DL_BASE}/${major}/latest/jdk-${major}_${platform}-${arch}_bin.${extension}`
);
}
possibleUrls.push(
`${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`
);
if (parseInt(major) < 17) {
throw new Error('Oracle JDK is only supported for JDK 17 and later');
}
const response = await this.http.head(fileUrl);
for (const url of possibleUrls) {
const response = await this.http.head(url);
if (response.message.statusCode === HttpCodes.NotFound) {
throw new Error(`Could not find Oracle JDK for SemVer ${range}`);
if (response.message.statusCode === HttpCodes.OK) {
return {url, version: range};
}
if (response.message.statusCode !== HttpCodes.NotFound) {
throw new Error(
`Http request for Oracle JDK failed with status code: ${response.message.statusCode}`
);
}
}
if (response.message.statusCode !== HttpCodes.OK) {
throw new Error(
`Http request for Oracle JDK failed with status code: ${response.message.statusCode}`
);
}
return {url: fileUrl, version: range};
throw new Error(`Could not find Oracle JDK for SemVer ${range}`);
}
public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions {

View File

@ -76,11 +76,18 @@ export class ZuluDistribution extends JavaBase {
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
const javaArchivePath = await tc.downloadTool(javaRelease.url);
let javaArchivePath = await tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
if (
process.platform === 'win32' &&
(this.architecture === 'arm64' || this.architecture === 'aarch64')
) {
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
javaArchivePath = javaArchivePathRenamed;
}
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
const archiveName = fs.readdirSync(extractedJavaPath)[0];

View File

@ -24,6 +24,9 @@ async function run() {
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
const jdkFile = core.getInput(constants.INPUT_JDK_FILE);
const cache = core.getInput(constants.INPUT_CACHE);
const cacheDependencyPath = core.getInput(
constants.INPUT_CACHE_DEPENDENCY_PATH
);
const checkLatest = getBooleanInput(constants.INPUT_CHECK_LATEST, false);
let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID);
@ -52,7 +55,11 @@ async function run() {
);
const content = fs.readFileSync(versionFile).toString().trim();
const version = getVersionFromFileContent(content, distributionName);
const version = getVersionFromFileContent(
content,
distributionName,
versionFile
);
core.debug(`Parsed version from file '${version}'`);
if (!version) {
@ -73,10 +80,10 @@ async function run() {
await auth.configureAuthentication();
if (cache && isCacheFeatureAvailable()) {
await restore(cache);
await restore(cache, cacheDependencyPath);
}
} catch (error) {
core.setFailed(error.message);
core.setFailed((error as Error).message);
}
}

View File

@ -104,10 +104,10 @@ export function generateToolchainDefinition(
} else
xmlObj = xmlCreate({
toolchains: {
'@xmlns': 'https://maven.apache.org/TOOLCHAINS/1.1.0',
'@xmlns:xsi': 'https://www.w3.org/2001/XMLSchema-instance',
'@xmlns': 'http://maven.apache.org/TOOLCHAINS/1.1.0',
'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
'@xsi:schemaLocation':
'https://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd',
'http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd',
toolchain: [
{
type: 'jdk',

View File

@ -7,6 +7,7 @@ import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
import {INPUT_JOB_STATUS, DISTRIBUTIONS_ONLY_MAJOR_VERSION} from './constants';
import {OutgoingHttpHeaders} from 'http';
export function getTempDir() {
const tempDirectory = process.env['RUNNER_TEMP'] || os.tmpdir();
@ -114,9 +115,23 @@ export function isCacheFeatureAvailable(): boolean {
export function getVersionFromFileContent(
content: string,
distributionName: string
distributionName: string,
versionFile: string
): string | null {
const javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
let javaVersionRegExp: RegExp;
function getFileName(versionFile: string) {
return path.basename(versionFile);
}
const versionFileName = getFileName(versionFile);
if (versionFileName == '.tool-versions') {
javaVersionRegExp =
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
} else {
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
}
const fileContent = content.match(javaVersionRegExp)?.groups?.version
? (content.match(javaVersionRegExp)?.groups?.version as string)
: '';
@ -161,3 +176,17 @@ export function convertVersionToSemver(version: number[] | string) {
}
return mainVersion;
}
export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const headers: OutgoingHttpHeaders = {
accept: 'application/vnd.github.VERSION.raw'
};
if (auth) {
headers.authorization = auth;
}
return headers;
}