Skip to content

Epic: Infer Java version/distribution from project files (.sdkmanrc, asdf, pom.xml, build.gradle) #1048

Description

@brunoborges

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    distributionJDK distribution/version/source supportfeature requestNew feature or request to improve the current logic
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions