setup-java/__tests__
Guillaume Smet 6657b99340
feat: Add set-default option (#1017)
* Add set-default option

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 #560

* Dedupe setJavaDefault and document multi-version/toolchain behavior

- 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>

* test: fix Prettier formatting in base-installer test

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>

---------

Co-authored-by: Bruno Borges <brborges@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-07 12:38:57 -04:00
..
cache feat: implement cache-dependency-path option to control caching dependency (#499) 2023-11-22 16:43:14 +01:00
data dist: Support Tencent Kona JDK (#672) 2026-07-07 11:00:40 -04:00
distributors feat: Add set-default option (#1017) 2026-07-07 12:38:57 -04:00
auth.test.ts feat: Disable interactiveMode in generated Maven settings.xml (#1052) 2026-07-02 17:22:38 -04:00
cache.test.ts Add Maven Wrapper cache feature (#1027) 2026-06-22 09:45:18 -05:00
cleanup-java.test.ts Spelling (#713) 2026-06-22 10:57:54 -04:00
gpg.test.ts feat: Add verify-signature plumbing and Temurin+Microsoft verification support (#1060) 2026-06-29 13:19:49 +01:00
maven-args.test.ts feat: suppress Maven transfer progress via MAVEN_ARGS by default (add show-download-progress input) (#1053) 2026-07-02 17:12:50 -04:00
toolchains.test.ts fix: Maven Toolchains grows unexpectedly (#534) 2026-07-07 00:01:31 -04:00
util.test.ts fix: reject non-semver candidate versions in isVersionSatisfies (#1009) 2026-06-17 22:47:02 -05:00
verify-java.sh Revert "Revert "Add support for Oracle JDK (#401)" (#421)" (#450) 2023-02-07 16:29:21 +01:00