version-fox / version-fox/vfox

Use pre-existing JDK installations

Open
#706 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
4k
Forks
157
Avg merge
1h 3m
Merged PRs (30d)
5

Description

I would like to use vfox on github action runners in a way that in case a JDK is already installed vfox does not download the JDK again but the pre-installed one can be registered into vfox.

I would like to be able to do something like this:

# in a initial step I search for installed JDKs and register them with vfox
vfox register java@11-tem /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.27-6
vfox register java@21-tem /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.3

# in later steps I want to call `vfox install java` via some external bash script like this:
vfox install java@11-tem  # should be a no-op since already installed
vfox install java@21-tem  # should be a no-op since already installed
 # query the install dirs of multiple JDKs so I can reference them in Maven's toolchains.xml
JAVA_11_HOME=$(vfox home java@11-tem) 
JAVA_21_HOME=$(vfox home java@21-tem) 

Is this already possible somehow? If not could something like this be added?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing vfox register, install, and home commands, using the GitHub Actions JDK paths and java@11-tem/java@21-tem examples in the issue. Determine how registered installations should be recognized by vfox install and exposed by vfox home. Done means pre-existing JDKs are registered without downloading again and their paths can be queried for Maven toolchains.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.