Epic: Infer Java version and/or distribution from project files
Several open requests ask setup-java to read the Java version and/or distribution from an existing project/tooling file instead of (or in addition to) the java-version / distribution inputs. They share one design space — "resolve setup inputs from a file on disk" — so this epic tracks them together to keep behavior, precedence, and the java-version-file input consistent across formats.
Today's baseline
java-version-file already supports .java-version and reading java.version from pom.xml / build files in some cases. The items below extend the set of recognized files and add distribution detection.
Sub-requests
Cross-cutting design questions
- Precedence when multiple sources are present (explicit input vs file vs multiple files).
- Whether a single
java-version-file input auto-detects format, or distinct inputs per source.
- How distribution names in third-party files (SDKMAN!, asdf) map to
setup-java distribution IDs.
- Behavior when a file specifies a distribution
setup-java doesn't support.
Notes
This epic is for coordination/visibility — the individual issues remain open and can be implemented independently. PR #975 already covers the .sdkmanrc slice (#971).
Epic: Infer Java version and/or distribution from project files
Several open requests ask
setup-javato read the Java version and/or distribution from an existing project/tooling file instead of (or in addition to) thejava-version/distributioninputs. They share one design space — "resolve setup inputs from a file on disk" — so this epic tracks them together to keep behavior, precedence, and thejava-version-fileinput consistent across formats.Today's baseline
java-version-filealready supports.java-versionand readingjava.versionfrompom.xml/ build files in some cases. The items below extend the set of recognized files and add distribution detection.Sub-requests
pom.xmlandbuild.gradleviajava-version-filejava-version-file(not just the version).sdkmanrc· implemented by PR feat: Add distribution detection support to .sdkmanrc file #975.tool-versions)Cross-cutting design questions
java-version-fileinput auto-detects format, or distinct inputs per source.setup-javadistribution IDs.setup-javadoesn't support.Notes
This epic is for coordination/visibility — the individual issues remain open and can be implemented independently. PR #975 already covers the
.sdkmanrcslice (#971).