setup-java/__tests__
Bruno Borges 4fbd0bd19d
fix: select musl JDK artifacts on Alpine for five distributions (#1220)
On Alpine, `getPlatformOption()` returned the glibc platform key for
Dragonwell, Corretto, Zulu, Liberica and Liberica NIK, so the action
resolved and installed a glibc JDK that cannot run under musl.

Add a shared `isAlpineLinux()` helper and use it to select each vendor's
musl artifacts:

| distribution | glibc         | musl           |
| ------------ | ------------- | -------------- |
| Dragonwell   | `linux`       | `alpine-linux` |
| Corretto     | `linux`       | `alpine`       |
| Zulu         | `linux_glibc` | `linux_musl`   |
| Liberica     | `linux`       | `linux-musl`   |
| Liberica NIK | `linux`       | `linux-musl`   |

Each key was verified against the vendor's live metadata API or manifest.

There is deliberately no silent fallback to glibc when a vendor has no
musl build for the requested version or architecture: the existing "could
not find a version that satisfies" error fires instead. This matches the
behaviour Temurin and SapMachine already have, and a glibc JDK would not
run on musl anyway.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 74248bb0-72af-41d8-b85d-b0f5836e68db
2026-08-05 12:54:41 -04:00
..
cache Restore dependency and wrapper caches concurrently (#1174) 2026-07-29 13:41:24 -04:00
data Remove legacy Adopt distributions in v6 (#1185) 2026-07-31 15:48:18 -04:00
distributors fix: select musl JDK artifacts on Alpine for five distributions (#1220) 2026-08-05 12:54:41 -04:00
auth.test.ts Import Maven signing keys into an isolated GPG home (#1214) 2026-08-05 12:05:36 -04:00
benchmark-cache-restore.sh Restore dependency and wrapper caches concurrently (#1174) 2026-07-29 13:41:24 -04:00
cache-feature.test.ts Optimize Temurin tool-cache fast path with lazy loading (#1179) 2026-07-29 17:53:33 -04:00
cache.test.ts Add dependency cache path overrides (#1175) 2026-07-29 14:43:55 -04:00
check-dir.sh Extract repeated directory-check assertions into check-dir.sh helper (#1127) 2026-07-15 11:14:40 -04:00
checksum.test.ts Verify JDK downloads with vendor checksums (#1167) 2026-07-29 04:43:56 -04:00
cleanup-java.test.ts Import Maven signing keys into an isolated GPG home (#1214) 2026-08-05 12:05:36 -04:00
gpg.test.ts Import Maven signing keys into an isolated GPG home (#1214) 2026-08-05 12:05:36 -04:00
java-package-contract.test.ts chore(deps): bump brace-expansion from 5.0.8 to 5.0.9 (#1202) 2026-08-04 21:15:15 -04:00
java-platform-contract.test.ts Fix JDK resolution cache platform identity (#1210) 2026-08-05 12:45:11 -04:00
jdk-cache.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
jdk-resolution-cache.test.ts Fix JDK resolution cache platform identity (#1210) 2026-08-05 12:45:11 -04:00
maven-args.test.ts Migrate to ESM and upgrade dependencies (#1078) 2026-07-08 10:15:00 +01:00
maven-xml-loading.test.ts Optimize Maven configuration warm path (#1182) 2026-07-30 15:09:35 -04:00
problem-matcher.test.ts Add an option to disable Java problem matchers (#1133) 2026-07-16 11:28:10 -04:00
retrying-http-client.test.ts Consolidate JDK metadata retry handling (#1162) 2026-07-29 00:09:37 -04:00
setup-java.module-loading.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
setup-java.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
toolchains.test.ts Optimize Maven configuration warm path (#1182) 2026-07-30 15:09:35 -04:00
util-install.test.ts Report concrete versions for floating Oracle JDK downloads (#1213) 2026-08-05 11:57:27 -04:00
util.test.ts Add conditional JDK caching (#1201) 2026-08-04 21:54:10 -04:00
verify-java.sh Report concrete versions for floating Oracle JDK downloads (#1213) 2026-08-05 11:57:27 -04:00