Skip to content

Further executions of setup-java overwrite previous toolchain entries for different JDK versions #1099

Description

@christian-ertl

Description:
Previously, it was possible to execute setup-java multiple times with different JDKs or JDK versions and have them all in the Maven toolchains XML. Now, it is always overwritten (contrary to the documentation under https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Modifying-Maven-Toolchains).

Using one execution of setup-java with multiple versions still works, but has the drawback that the output contains only the path of the last version.

Task version:
Since v5.5.0, probably because of #534.

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Execute setup-java consecutively with different versions. Output the Maven toolchains XML.

Expected behavior:
Multiple toolchain entries should be present.

Actual behavior:
Only a single toolchain entry is present.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions