Repository navigation
Overgrowing of the toolchains.xml on the self-hosted runners #530
Copy link
Copy link
Labels
bugSomething isn't workingSomething isn't workingmavenMaven settings, toolchains, and publishing authMaven settings, toolchains, and publishing auth
Description
Description:
Every time build runs setup-java adds a new toolchain element to toolchains.xml. Even if it already exists.
<?xml version="1.0"?>
<toolchains xmlns="https://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
<vendor>temurin</vendor>
<id>temurin_17</id>
</provides>
<configuration>
<jdkHome>C:\actions-runner\_work\_tool\Java_Temurin-Hotspot_jdk\17.0.7-7\x64</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
<vendor>temurin</vendor>
<id>temurin_17</id>
</provides>
<configuration>
<jdkHome>C:\actions-runner\_work\_tool\Java_Temurin-Hotspot_jdk\17.0.7-7\x64</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
<vendor>temurin</vendor>
<id>temurin_17</id>
</provides>
<configuration>
<jdkHome>C:\actions-runner\_work\_tool\Java_Temurin-Hotspot_jdk\17.0.7-7\x64</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
<vendor>temurin</vendor>
<id>temurin_17</id>
</provides>
<configuration>
<jdkHome>C:\actions-runner\_work\_tool\Java_Temurin-Hotspot_jdk\17.0.7-7\x64</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
<vendor>temurin</vendor>
<id>temurin_17</id>
</provides>
<configuration>
<jdkHome>C:\actions-runner\_work\_tool\Java_Temurin-Hotspot_jdk\17.0.7-7\x64</jdkHome>
</configuration>
</toolchain>
</toolchains>
Thanks @cyrillzadra for mentioning this issue.
Task version:
v3
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Repro steps:
Run actions several times in a row and check the toolchains.xml file.
Expected behavior:
The toolchains.xml should have only none identical toolchains records.
Actual behavior:
The toolchains.xml has several (in relation to number of action runs) identical toolchains records.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmavenMaven settings, toolchains, and publishing authMaven settings, toolchains, and publishing auth
Activity
fix: Maven Toolchains grows unexpectedly
fix: Maven Toolchains grows unexpectedly
fix: Maven Toolchains grows unexpectedly
fpiresca commentedon May 29, 2024
I am getting this weird issue as well, and from the logs it seems this file is already 41k lines.
If I delete this file does the job will able to repair it?
Okeanos commentedon May 29, 2024
The file should be recreated and then grow again; the only problem is if you added custom information to it manually. You'd have to redo that part. However, what you probably could do as a workaround is a run a custom shell step at the end of the job to delete this file and have it re-created again during setup-java execution.
fix: Maven Toolchains grows unexpectedly
fix: Maven Toolchains grows unexpectedly
fix: Maven Toolchains grows unexpectedly
fix: Maven Toolchains grows unexpectedly
brunoborges commentedon Jun 23, 2026
Linking implementation: this is being addressed by PR #534 (Maven toolchains.xml unexpected growth). Tracking it there — this issue should auto-close when #534 merges.
fix: Maven Toolchains grows unexpectedly (actions#534)