This is the dedicated public example for the shipped SDKMAN-backed Java toolchain boundary.
Use it when the repo wants toolchains.java to own java and javac, while Maven stays explicit
under tools.
toolchains.javais the owner for the managed Java runtime andjavactoolchains.java.fulfillmentseparates Java capability truth from fulfillment truthfulfillment.source: sdkmanis the canonical public way to say the selected path should use SDKMAN-backed fulfillmentrequirements.toolchainsselects the Java runtime lane for the chosen task path- Maven should stay under
tools.mavenbecause the Java toolchain does not own it in v1 runtimes.java,tools.java, andtools.javacshould not be declared alongsidetoolchains.java
Rust proves the richer managed-surface shape and Node proves the narrower Corepack shape. This example teaches the Java boundary directly:
- one Java toolchain owner
- one standalone Maven tool lane
- one selected-path contract that keeps those owners separate
Inspect the contract first:
ota validate .
ota doctor .
ota up --dry-run .
ota tasks --use .Use ota tasks --use . to inspect the runnable task surface before execution: command preview,
mode selection, safety posture, declared effects, and the matching dry-run / receipt follow-up
commands stay visible in one place.
Then compare the selected task paths:
ota run build
ota run testota doctorshould diagnose Java throughtoolchains.javaota up --dry-runshould showtoolchains.javathrough structured fulfillment and keep Maven separate as a standalone tool requirementota run buildandota run testshould require both the Java toolchain and Maven- ota should reject duplicate
runtimes.java,tools.java, ortools.javacdeclarations
- Java repos that currently hide SDKMAN or JDK setup in shell scripts
- repos that want one clear Java owner without pretending Maven belongs to the toolchain
- teams that need one copyable example for the shipped Java toolchain surface