Introduce a sdk pin command that allows pinning a candidate to a flexible version selector rather than an exact version.
This is particularly useful for .sdkmanrc — teams can declare "this project needs Java 17" without locking to a specific patch release or distribution, and SDKMAN resolves to whatever matching version the user has installed.
Proposed selectors
sdk pin java 17 — pin to latest installed Java 17 (any distribution)
sdk pin java 17-tem — pin to latest installed Temurin 17
sdk pin java latest — pin to the latest installed version overall
Behaviour
- Resolves at runtime to the best matching locally installed version
- Fails clearly if no matching version is installed
Related
- sdkman-cli #920 (closed — fuzzy version matching request)
Introduce a
sdk pincommand that allows pinning a candidate to a flexible version selector rather than an exact version.This is particularly useful for
.sdkmanrc— teams can declare "this project needs Java 17" without locking to a specific patch release or distribution, and SDKMAN resolves to whatever matching version the user has installed.Proposed selectors
sdk pin java 17— pin to latest installed Java 17 (any distribution)sdk pin java 17-tem— pin to latest installed Temurin 17sdk pin java latest— pin to the latest installed version overallBehaviour
Related