jenkinsci / jenkinsci/jdk-tool-plugin

[JENKINS-69205] Different name same version installation not working

Open
#116 0 comments 0 reactions 0 assignees View on GitHub
component:jdk-tool-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
4
Forks
28
PR merge metrics
No merged PRs in 30d

Description

If you declare two (or more) times the same JDK version using different names you can install only one of them because of the name of the directory which is written inside the zip in the cache directory.

For example:


  • Name: BUILD_JDK

  • Version: jdk-11.0.16+8


  • Name: SONARQUBE_JDK

  • Version: jdk-11.0.16+8

The root directory inside [...]/jenkins-home/caches/adoptopenjdk/WINDOWS/amd64/jdk-11.0.16+8.zip is "BUILD_JDK" (the first used), so when it needs to install SONARQUBE_JDK it simply creates an empty directory.

---
Originally reported by jhack, imported from: Different name same version installation not working


  • status: Open
  • priority: Major
  • component(s): jdk-tool-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 20251215-193512

Raw content of original issue

If you declare two (or more) times the same JDK version using different names you can install only one of them because of the name of the directory which is written inside the zip in the cache directory.

For example:


  • Name: BUILD_JDK

  • Version: jdk-11.0.16+8


  • Name: SONARQUBE_JDK

  • Version: jdk-11.0.16+8

The root directory inside [...]/jenkins-home/caches/adoptopenjdk/WINDOWS/amd64/jdk-11.0.16+8.zip is "BUILD_JDK" (the first used), so when it needs to install SONARQUBE_JDK it simply creates an empty directory.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the JDK installation and cache handling described in the issue, focusing on how the cached ZIP's root directory is used. Reproduce the two differently named declarations with version jdk-11.0.16+8 on Windows amd64. Done means both names install successfully without an empty directory being created for the second installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.