mirror of
https://github.com/actions/setup-java.git
synced 2026-07-07 13:25:45 +00:00
* fix: Maven Toolchains grows unexpectedly On self-hosted runners toolchains.xml may survive multiple runs and unexpectedly grow as a result of the toolchains setup simply appending the JDK definition even if one with the same `type` and `provides.id` already exists. Restructuring the parsing step and filtering the potentially existing list of toolchain definitions prevents this and also fixes toolchain.xml files that already contain duplicates. Fixes #530 * fix: guard toolchain dedup and preserve existing root attributes Address reviewer feedback on the Maven toolchains dedup logic: - Treat jdk toolchains without a string `provides.id` as non-deduplicatable and use optional access when comparing ids, so partially-formed or nonstandard toolchains.xml files no longer crash setup. - Preserve the existing `<toolchains>` root attributes (xmlns, schemaLocation, …) when present, falling back to the 1.1.0 defaults only for attributes the existing file is missing. This avoids silently rewriting user-managed metadata or changing the effective namespace. Adds tests covering custom root attributes and id-less jdk toolchains, and rebuilds dist/. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Bruno Borges <brborges@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cache | ||
| data | ||
| distributors | ||
| auth.test.ts | ||
| cache.test.ts | ||
| cleanup-java.test.ts | ||
| gpg.test.ts | ||
| maven-args.test.ts | ||
| toolchains.test.ts | ||
| util.test.ts | ||
| verify-java.sh | ||