JVM Build Tooling Workflow
Purpose
Keep JVM build and dependency work grounded in the repository's real build tool.
The practical decision is which tool owns the project, which wrapper or pinned toolchain should be used, which module is affected, and which command proves the change without relying on machine-global state.
When To Use
- Use this skill when a JVM backend task touches Gradle, Maven, SBT, Java versions, dependencies, modules, package tasks, or local run commands.
- Use this skill before adding dependencies or changing build files.
- Use this skill when build failures need phase-aware triage.
- Use this skill when the repository shape is unclear and
choose-service-shape identified build tooling as the next owner.
Source Check
Use repo-local build files, checked-out dependency sources, Dash MCP or Dash HTTP for installed build-tool docsets, and then official build tool documentation when Dash/local coverage is missing or stale:
Translate documentation rules into concrete build-file, command, or module decisions.
Inspection Workflow
- Identify the build owner:
- Gradle:
settings.gradle, settings.gradle.kts, build.gradle, build.gradle.kts, gradlew
- Maven:
pom.xml, .mvn/
- SBT:
build.sbt, project/*.scala, project/*.sbt
- Prefer repository wrappers:
- use
./gradlew when present
- use
./mvnw when present
- use
sbt only after checking for repo-local launcher conventions
- Inspect Java/toolchain policy:
- Gradle Java toolchains
- Maven compiler release/source/target
- SBT
javacOptions, scalacOptions, ThisBuild / scalaVersion, and JVM settings
.java-version, .sdkmanrc, .tool-versions, or CI setup
- Inspect dependencies:
- Gradle version catalogs, platforms, constraints, and repositories
- Maven dependency management, parent POMs, profiles, and repositories
- SBT library dependencies, plugins, resolvers, and cross-versioning
- Inspect module boundaries:
- Gradle subprojects
- Maven modules
- SBT projects
- Java/Scala source sets
- shared JVM libraries versus Android modules
Command Selection
Choose the narrowest useful command first:
- Gradle compile:
./gradlew :module:classes
- Gradle test:
./gradlew :module:test
- Gradle full verification:
./gradlew test
- Maven compile:
mvn -pl module -am test-compile
- Maven test:
mvn -pl module -am test
- Maven full verification:
mvn test
- SBT compile:
sbt module/compile
- SBT test:
sbt module/test
- SBT full verification:
sbt test
Use the repository's documented commands when they differ.
Dependency Rules
- Use fetchable package repositories or source repositories only.
- Do not commit machine-local paths, local Maven repositories, local Ivy caches, unpublished local jars, or absolute paths.
- Preserve existing version catalog, dependency management, or plugin-management patterns.
- Add a new dependency only when it removes real complexity or matches an existing repo pattern.
- Keep dependency updates separate from feature work when the update has broad risk.
Failure Triage
Classify failures by phase:
- toolchain selection
- dependency resolution
- compile
- annotation processing or code generation
- test discovery
- test execution
- package or artifact creation
Report the command, module, phase, first meaningful error, likely cause, and smallest next check.
Output Shape
Return:
Build owner: Gradle, Maven, SBT, and wrapper command.
Affected modules: module or project names.
Toolchain policy: Java, Scala, and plugin version constraints.
Dependency decision: add, update, preserve, or remove.
Validation path: exact commands.
Risk: build, dependency, generated-source, or cross-module risks.
Guardrails
- Do not mix Gradle, Maven, and SBT commands speculatively.
- Do not run multiple build or test commands concurrently.
- Do not add machine-local dependency paths.
- Do not change Java, Scala, Gradle, Maven, or SBT versions without explaining the compatibility impact.
- Do not make backend build decisions inside Android-owned modules unless the task is explicitly about a shared non-Android JVM library.
1---2name: build-tooling-workflow3description: Inspect and maintain server-side JVM build tooling across Gradle, Maven, and SBT, including wrapper policy, Java toolchains, dependencies, multi-module boundaries, local run commands, tests, package tasks, and machine-local dependency guardrails.4license: Apache-2.05---67# JVM Build Tooling Workflow89## Purpose1011Keep JVM build and dependency work grounded in the repository's real build tool.1213The practical decision is which tool owns the project, which wrapper or pinned toolchain should be used, which module is affected, and which command proves the change without relying on machine-global state.1415## When To Use1617- Use this skill when a JVM backend task touches Gradle, Maven, SBT, Java versions, dependencies, modules, package tasks, or local run commands.18- Use this skill before adding dependencies or changing build files.19- Use this skill when build failures need phase-aware triage.20- Use this skill when the repository shape is unclear and `choose-service-shape` identified build tooling as the next owner.2122## Source Check2324Use repo-local build files, checked-out dependency sources, Dash MCP or Dash HTTP for installed build-tool docsets, and then official build tool documentation when Dash/local coverage is missing or stale:2526- [Gradle User Manual](https://docs.gradle.org/current/userguide/userguide.html)27- [Gradle Toolchains for JVM projects](https://docs.gradle.org/current/userguide/toolchains.html)28- [Maven documentation](https://maven.apache.org/guides/)29- [Maven Compiler Plugin documentation](https://maven.apache.org/plugins/maven-compiler-plugin/)30- [SBT Reference Manual](https://www.scala-sbt.org/1.x/docs/)31- [SBT multi-project builds](https://www.scala-sbt.org/1.x/docs/Multi-Project.html)3233Translate documentation rules into concrete build-file, command, or module decisions.3435## Inspection Workflow36371. Identify the build owner:38 - Gradle: `settings.gradle`, `settings.gradle.kts`, `build.gradle`, `build.gradle.kts`, `gradlew`39 - Maven: `pom.xml`, `.mvn/`40 - SBT: `build.sbt`, `project/*.scala`, `project/*.sbt`412. Prefer repository wrappers:42 - use `./gradlew` when present43 - use `./mvnw` when present44 - use `sbt` only after checking for repo-local launcher conventions453. Inspect Java/toolchain policy:46 - Gradle Java toolchains47 - Maven compiler release/source/target48 - SBT `javacOptions`, `scalacOptions`, `ThisBuild / scalaVersion`, and JVM settings49 - `.java-version`, `.sdkmanrc`, `.tool-versions`, or CI setup504. Inspect dependencies:51 - Gradle version catalogs, platforms, constraints, and repositories52 - Maven dependency management, parent POMs, profiles, and repositories53 - SBT library dependencies, plugins, resolvers, and cross-versioning545. Inspect module boundaries:55 - Gradle subprojects56 - Maven modules57 - SBT projects58 - Java/Scala source sets59 - shared JVM libraries versus Android modules6061## Command Selection6263Choose the narrowest useful command first:6465- Gradle compile: `./gradlew :module:classes`66- Gradle test: `./gradlew :module:test`67- Gradle full verification: `./gradlew test`68- Maven compile: `mvn -pl module -am test-compile`69- Maven test: `mvn -pl module -am test`70- Maven full verification: `mvn test`71- SBT compile: `sbt module/compile`72- SBT test: `sbt module/test`73- SBT full verification: `sbt test`7475Use the repository's documented commands when they differ.7677## Dependency Rules7879- Use fetchable package repositories or source repositories only.80- Do not commit machine-local paths, local Maven repositories, local Ivy caches, unpublished local jars, or absolute paths.81- Preserve existing version catalog, dependency management, or plugin-management patterns.82- Add a new dependency only when it removes real complexity or matches an existing repo pattern.83- Keep dependency updates separate from feature work when the update has broad risk.8485## Failure Triage8687Classify failures by phase:8889- toolchain selection90- dependency resolution91- compile92- annotation processing or code generation93- test discovery94- test execution95- package or artifact creation9697Report the command, module, phase, first meaningful error, likely cause, and smallest next check.9899## Output Shape100101Return:1021031. `Build owner`: Gradle, Maven, SBT, and wrapper command.1042. `Affected modules`: module or project names.1053. `Toolchain policy`: Java, Scala, and plugin version constraints.1064. `Dependency decision`: add, update, preserve, or remove.1075. `Validation path`: exact commands.1086. `Risk`: build, dependency, generated-source, or cross-module risks.109110## Guardrails111112- Do not mix Gradle, Maven, and SBT commands speculatively.113- Do not run multiple build or test commands concurrently.114- Do not add machine-local dependency paths.115- Do not change Java, Scala, Gradle, Maven, or SBT versions without explaining the compatibility impact.116- Do not make backend build decisions inside Android-owned modules unless the task is explicitly about a shared non-Android JVM library.