# # █████ # ░░███ # ██████ ███████ ██████ # ███░░███░░░███░ ░░░░░███ # ░███ ░███ ░███ ███████ # ░███ ░███ ░███ ███ ███░░███ # ░░██████ ░░█████ ░░████████ # ░░░░░░ ░░░░░ ░░░░░░░░ # # Copyright (C) 2026 — 2026, Ota. All Rights Reserved. # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # Licensed under the Apache License, Version 2.0. See LICENSE for the full license text. # You may not use this file except in compliance with that License. # Unless required by applicable law or agreed to in writing, software distributed under the # License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, # either express or implied. See the License for the specific language governing permissions # and limitations under the License. # # If you need additional information or have any questions, please email: os@ota.run version: 1 project: name: basic-java description: Basic Java repo with toolchain-owned Java plus Maven tasks type: application toolchains: java: version: "22" tools: maven: "3.9" checks: - name: maven-installed kind: precondition severity: error run: mvn --version tasks: setup: description: Warm the Maven dependency graph prepare: kind: dependency_hydration medium: package_dependencies source: kind: maven cwd: . requirements: toolchains: - java tools: maven: "3.9" checks: - maven-installed effects: network: true network_kind: dependency_hydration build: description: Compile and package the repo command: exe: mvn args: - package depends_on: - setup requirements: toolchains: - java tools: maven: "3.9" test: description: Run the Maven test suite command: exe: mvn args: - test depends_on: - setup requirements: toolchains: - java tools: maven: "3.9" workflows: default: verify verify: description: Canonical Java toolchain warmup and verification path setup: task: setup run: task: test notes: | Use this when you want the repo front door instead of calling Maven tasks directly. `toolchains.java` owns Java and `javac`, while Maven remains a standalone build tool. agent: entrypoint: setup default_task: test safe_tasks: - setup - build - test verify_after_changes: - test writable_paths: - src - test - docs protected_paths: - ota.yaml notes: | Use `ota validate` before changes and `ota workflows` to inspect the dependency-and-test path. Keep Java ownership under `toolchains.java`, leave Maven under `tools`, and use `ota run test` to verify Java changes.