Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: sdkmanrc - Pin Java to minor or major-version #1154

Open
2 of 3 tasks
tim-hilt opened this issue Dec 12, 2022 · 2 comments
Open
2 of 3 tasks

Question: sdkmanrc - Pin Java to minor or major-version #1154

tim-hilt opened this issue Dec 12, 2022 · 2 comments

Comments

@tim-hilt
Copy link

Question

We have .sdkmanrcs in our project to ensure everyone's using the same java-version. However, we aren't particular to the exact-version. We just need a way to enforce (e.g.) Java 11.

The problem with setting the exact version is, that it might be outdated as soon as another developer joins the team. The existing team-members already have the java-version installed via sdkman, so sdk env works as expected. The new team-member can't install the now missing Java-version and we are forced to update the .sdkmanrc across all repositories, the new team-member is expected to use.

This is a chore I would like to avoid in the future.

Is there a way to use sdkman to achieve what I'm asking for? Is this maybe a non-idiomatic request that should be handled differently?

System info

Not relevant (will provide if seemingly relevant though)

@FDelporte
Copy link
Contributor

+1

It would indeed be great if you would be able to install the latest version of a specific distribution of version.

For instance, with a command like this:

sdk install java {DISTRIBUTION} {VERSION}
sdk install java zulu 19

@rafa-minimal
Copy link

Would be perfect if you could simply put in your .sdkmanrc:

java=17

I guess full semver support is not necessary. Simply "get the latest version available starting with the prefix" would really do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants