Markus Hoffrogge
1d68cf3e34
Update from npm run format to fix prettier check
...
- missed in initial commit
- took re-built dist from GH actions
2026-04-16 00:22:57 +02:00
Markus Hoffrogge
b28c8117d5
Add inputs 'update-toolchains-only', 'update-env-javahome', 'add-to-env-path'
...
Changes in detail:
------------------
- action.yml:
- add inputs:
- update-toolchains-only
- update-env-javahome
- add-to-env-path
- update description for input "overwrite-settings"
- remove default value of input "overwrite-settings",
since the default is now propagated from input 'update-toolchains-only'
- base-models.ts:
- extend interface JavaInstallerOptions:
- add fields:
- updateEnvJavaHome: boolean;
- addToEnvPath: boolean;
- constants.ts:
- add constant INPUT_UPDATE_TOOLCHAINS_ONLY
= 'update-toolchains-only'
- auth.ts:
- function configureAuthentication():
- add parameter:
- overwriteSettings: boolean
- remove the now obsolete const overwriteSettings
- toolchains.ts:
- function configureToolchains(...):
- add parameter updateToolchains: boolean
- remove the now obsolete const overwriteSettings
- improve variable naming:
- rename any occurrence of 'overwriteSettings'
by 'updateToolchains'
- add field updateToolchains: boolean to the parameter object
- function writeToolchainsFileToDisk(...):
- improve variable naming:
- rename variable 'settingsExists'
by 'toolchainsExists'
- update wording of info logs to be more applicable
- setup-java.ts:
- interface installerInputsOptions:
- rename to IInstallerInputsOption to meet common coding convention
- add fields:
- updateToolchainsOnly: boolean;
- overwriteSettings: boolean;
- updateEnvJavaHome: boolean;
- addToEnvPath: boolean;
- function run():
- add const:
- const updateToolchainsOnly:
- get as boolean from input 'update-toolchains-only', default: false
- const overwriteSettings:
- get as boolean from input 'overwrite-settings', default: !updateToolchainsOnly
- const updateEnvJavaHome:
- get as boolean input 'update-env-javahome', default: !updateToolchainsOnly
- const addToEnvPath:
- get as boolean input 'add-to-env-path', default: !updateToolchainsOnly
- extend const installerInputsOptions to match with IInstallerInputsOption:
- add field updateToolchainsOnly
- add field overwriteSettings
- add field updateEnvJavaHome
- add field addToEnvPath
- update call of auth.configureAuthentication()
to auth.configureAuthentication(overwriteSettings)
- function installVersion(...):
- add const and init from parameter options:
- updateToolchainsOnly, overwriteSettings,
updateEnvJavaHome, addToEnvPath
- init the additional fields of installerInputsOptions accordingly
- call toolchains.configureToolchains(...):
- with parameter updateToolchains= overwriteSettings || updateToolchainsOnly
- base-installer.ts:
- add constants to import from constants:
- INPUT_UPDATE_JAVA_HOME
- INPUT_ADD_TO_PATH
- add fields:
- protected updateEnvJavaHome: boolean;
- protected addToEnvPath: boolean;
- ctor:
- init these fields from JavaInstallerOptions accoprdingly
- function setJavaDefault(...):
- if updateEnvJavaHome is false:
- SKIP updating env.JAVA_HOME
- log info:
`Skip updating env.JAVA_HOME according to ${INPUT_UPDATE_JAVA_HOME}`
- if addToEnvPath is false:
- SKIP adding toolchain path to env.PATH
- log info:
`Skip adding to env.PATH according to ${INPUT_ADD_TO_PATH}`
2026-04-16 00:22:57 +02:00
Chiranjib Swain
0756542bc5
Refactor error handling and improve test logging for installers ( #989 )
...
* Refactor error handling for version not found cases across multiple installers
* Mock core.error in tests to suppress error logs
* fix(graalvm): improve error messages for EA version not found scenarios
* refactor(tests): update error messages for version not found scenarios
* fix(graalvm): enhance error messages for version not found scenarios
* fix(graalvm): improve error messages for version not found scenarios with updated download URL
* fix(graalvm): improve error handling for EA version not found scenarios with clearer messages
2026-04-13 12:44:45 -05:00
Piotr Findeisen
5d7b214633
Retry on HTTP 522 Connection timed out ( #964 )
...
This is supposed to be CloudFlare specific 522 Connection timed out HTTP
error code.
2025-12-23 16:49:17 -06:00
priya-kinthali
6ba5449b7d
Enhance error logging for network failures to include endpoint/IP details, add retry mechanism and update workflows to use macos-15-intel ( #946 )
...
* enhance error logging and implement retry
* Replace macos-13 with macos-15-intel
* refactored code based on Copilot suggestions
2025-11-13 13:34:50 -06:00
gowridurgad
ebb356cc4e
Improve Error Handling for Setup-Java Action to Help Debug Intermittent Failures ( #848 )
...
* error-handling
* Logic update
---------
Co-authored-by: “gowridurgad” <“hgowridurgad@github.com>
2025-06-23 12:32:03 -05:00
Ivan
0de5c66fc0
Add and configure ESLint and update configuration for Prettier ( #458 )
...
* Add ESLint config and update Prettier
* Update test files
* Rebuild action
* Update docs
* Update licenses
* Update tsconfig
* Rebuild action
* Update tsconfig.json
* Fix console.time calls
* Rebuild action
* Rebuild action on Linux
2023-03-09 14:49:35 +02:00
Wes Morgan
3617c43588
Default to runner architecture ( #376 )
2022-10-11 01:47:17 +02:00
qhy040404
7bbeb80d24
Fix typo ( #380 )
2022-09-09 13:35:58 +02:00
Dmitry Shibanov
d854b6da19
Add support for multiple jdks ( #368 )
2022-09-08 15:26:54 +02:00
Manuel
bae3140877
Add Amazon Corretto distribution ( #312 )
2022-04-29 12:38:36 +02:00
Maxim Lobanov
b53500dabc
Merge "v2-preview" branch into "main" ( #150 )
...
* actions/setup-java@v2 - Support different distributions (#132 )
* Implement support for custom vendors in setup-java
* minor improvements
* minor refactoring
* Add unit tests and e2e tests
* Update documentation for setup-java@v2 release
* minor improvements
* regenerate dist
* fix comments
* resolve comments
* resolve comments
* fix tests
* Update README.md
Co-authored-by: George Adams <george.adams@microsoft.com>
* Apply suggestions from code review
Co-authored-by: Konrad Pabjan <konradpabjan@github.com>
* fix minor nitpicks
* handle 4th digit
* pull latest main
* Update README.md
* rename adoptium to adopt
* rename adoptium to adopt
* rename adoptium to adopt
* Update README.md
* make java-version and distribution required for action
* update readme
* fix tests
* fix e2e tests
Co-authored-by: George Adams <george.adams@microsoft.com>
Co-authored-by: Konrad Pabjan <konradpabjan@github.com>
* Add "overwrite-settings" input parameter (#136 )
* add overwrite-settings parameter
* fix e2e tests
* print debug
* fix e2e tests
* add comment
* remove comment
* Add "Contents/Home" postfix on macOS if provider creates it (#139 )
* Update e2e-versions.yml
* Update e2e-versions.yml
* implement fix
* Update e2e-versions.yml
* Update installer.ts
* fix filter logic
* Update e2e-versions.yml
* remove extra logic
* Update e2e-versions.yml
* Add check-latest flag (#141 )
* add changes for check-latest
* run prerelease script
* resolving comments
* fixing tests
* fix spelling
* improve core.info messages
* run format
* run prerelease
* change version to fix test
* resolve comment for check-latest
* Update README.md
* added hosted tool cache section
* Apply suggestions from code review
Co-authored-by: Maxim Lobanov <v-malob@microsoft.com>
Co-authored-by: Konrad Pabjan <konradpabjan@github.com>
* Avoid "+" sign in Java path in v2-preview (#145 )
* try to handle _ versions
* more logs
* more debug
* test 1
* more fixes
* fix typo
* Update e2e-versions.yml
* add unit-tests
* remove debug info from tests
* debug pre-cached versions
* change e2e tests to ubuntu-latest
* update npm licenses
Co-authored-by: George Adams <george.adams@microsoft.com>
Co-authored-by: Konrad Pabjan <konradpabjan@github.com>
Co-authored-by: Dmitry Shibanov <dmitry-shibanov@github.com>
2021-04-05 13:02:27 +03:00