feat: Add set-default option#1017
Conversation
This option allows to install an additional JDK without making it the default one. I have wanted this for quite a long time as I'm running custom GitHub Actions with Java, which might require a specific JDK and I don't want to pollute the JDK that is used by the overall workflow calling the action. And I'm apparently not alone as there was a preexisting issue. Fixes actions#560
- Refactor setJavaDefault to delegate shared output/env logic to setJavaEnvironment, avoiding duplication between the two. - Document that set-default applies to all JDKs in a multiline java-version, and that installed JDKs remain registered in Maven toolchains regardless of set-default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Cross-linking for coordination: this
The one piece #553 covered that this PR does not is a Maven toolchains-only install (register the JDK in No change requested here — just establishing the lineage: #560 (this PR) and #552 → #1047. |
|
@brunoborges thanks for taking good care of this PR. Let me know if you need anything from me. |
Resolves the failing 'Basic validation / build' format-check on __tests__/distributors/base-installer.test.ts (line exceeded print width). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description:
Add a
set-defaultoption allowing to install an additional JDK without making it the default one.I have wanted this for quite a long time as I'm running custom GitHub Actions with Java, which might require a specific JDK and I don't want to pollute the JDK that is used by the overall workflow calling the action.
And I'm apparently not alone as there was a preexisting issue.
Related issue:
Fixes #560
Check list: