Setup Java Spring Boot Poms
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Generates (or updates, announcing which) the whole multi-module build for a DDD/hexagonal Spring Boot service, in the
language and build tool the springboot-stack.yml manifest records: a Maven reactor (root pom.xml holding every
dependency and plugin version, plus one pom.xml per module) for Java or Kotlin, or a Gradle Kotlin DSL multi-project
build for Kotlin, together with the shared static-analysis configuration the build references.
Purpose
Which build is written depends on the manifest’s project.language (java/kotlin) and project.buildTool
(maven/gradle); absent fields mean Java on Maven, regenerated exactly as before. Java with Gradle is invalid and
stops the skill.
| Language | Build tool | What is written |
|---|---|---|
|
|
Maven reactor with the Java toolchain (Lombok, MapStruct, Checkstyle, PMD, SpotBugs, Javadoc). |
|
|
The same reactor with the Kotlin deltas: |
|
|
|
iru-setup-java-springboot-pom exists to make the hexagonal architecture enforceable by the build rather than by
convention. Two rules govern everything it writes:
-
Every version lives in one place. On Maven that is the root
pom.xml: module poms declaregroupId/artifactIdonly, resolving through the root’sdependencyManagementandpluginManagement. On Gradle it isgradle/libs.versions.toml, with the Spring Boot BOM applied throughplatform(). A version anywhere else is treated as a defect, and the verification step checks for exactly that. -
Starter and driver artifact names come from the Spring Initializr reference pom, never from memory, because they change across Boot major versions.
It enforces Java 21 through maven.compiler.release, java.version, and a maven-enforcer-plugin
requireJavaVersion [21,) rule, and enforces the module dependency direction through a per-module
bannedDependencies rule — domain may not see Spring or any outer module, application may not see
infrastructure or api, no infrastructure module may see a sibling, and api may not see infrastructure.
boot is the composition root and bans nothing.
The full report/quality plugin set is wired with generated sources excluded from every analysis: Javadoc,
Checkstyle, PMD, SpotBugs, Surefire (unit, *Test), Failsafe (integration, *IT), JaCoCo per module plus a
report-aggregate in a dedicated coverage module, JXR for cross-referenced source, Maven Site as the
aggregator, groovy-maven-plugin writing build-info.properties into boot, and sonar-maven-plugin (Kotlin swaps
Javadoc/Checkstyle/PMD/SpotBugs for Dokka/detekt/ktlint). On Gradle there is no enforcer, so the boundaries are
guarded by the declared project(":…") dependencies plus the ArchUnit test written by
iru-setup-java-springboot-modules.
Plugin
Shipped by the iru-springboot plugin of the ai-catalog marketplace (install with /plugin install iru-springboot@ai-catalog; see Plugins).
Invocation
/iru-setup-java-springboot-pom
stack-file: springboot-stack.yml
initializr-pom: <path>
mode: new|existing
on-existing: ask|keep|update|replace
The second form (with args lines) is how iru-setup-java-springboot calls it.
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
|
|
No |
|
Fetched fresh from |
|
No |
|
None |
|
No |
|
|
Existing files handling |
No |
The skill says whether it is generating the reactor from scratch or updating an existing one, listing which of the
root pom, module poms, |
None — user must choose |
Outputs
-
Root
pom.xml— the Spring Boot parent, the module list, all version properties, every BOM import copied from the reference pom,dependencyManagementfor the project’s own modules, project-wide dependencies, and the full build/reporting plugin configuration.pluginManagementalso version-manages the code and documentation generators that Setup Java Spring Boot APIs wires into individual modules — the OpenAPI, protobuf, GraphQL-codegen and AVRO plugins, plusfrontend-maven-pluginfor the AsyncAPI documentation generators — along with theasyncapi.docs.skipproperty that lets an offline build opt out of the npm-based documentation step. The GraphQL codegen version is shared with thegraphql-java-codegenruntime artifact that generated GraphQL client code extends, so the two cannot drift apart. Thesonar.*properties and thesonar-maven-pluginentry are written only when the manifest’ssonar.modeisn’tnone(even ifci.enabledisfalse, in which case an XML comment notes that no CI step sends reports), withsonar.host.urlresolved per mode (SonarCloud forcloud, the manifest’s host forself-hosted) andsonar.organizationomitted forself-hostedunless the manifest set one. When the manifest’sfrontendishilla, the root pom additionally gains avaadin.version/vaadin.skipproperty pair, avaadin-bomdependencyManagementimport, avaadin-maven-pluginpluginManagemententry, and aproductionprofile (vaadin.productionMode=true) — all four omitted otherwise; see Setup Java Spring Boot Hilla for how a module is wired against these pins. -
One
pom.xmlper module named in the manifest, plus the intermediate aggregator poms (infrastructure/,infrastructure/database/,infrastructure/clients/,api/). Eachinfrastructure/clients/<name>additionally carries, attestscope, the Testcontainers module for whichever API mockstack.apiMocknames, so that module’s own*ITcan start just the mock instead of the whole compose stack. -
coverage/pom.xml— JaCoCoreport-aggregateacross every module, declared last in the reactor so every module’s execution data already exists when it runs. -
boot/pom.xml— additionally carryingspring-boot-maven-pluginand thegroovy-maven-pluginbuild-info step. -
Kotlin on Maven: Kotlin-specific root pom properties (
kotlin.versionas recorded in the manifest, i.e. the version Spring Boot manages, MockK, springmockk, detekt, ktlint, Dokka),src/main/kotlin/src/test/kotlin.gitkeepplaceholders in every jar module (unlesssonar.modeisnone), and rootdetekt.ymland.editorconfig. -
Kotlin on Gradle:
settings.gradle.kts,gradle.properties,gradle/libs.versions.toml, rootbuild.gradle.kts, thebuild-logic/included build with five convention plugins, onebuild.gradle.ktsper leaf module (aggregator directories get none),detekt.yml,.editorconfig, and the Gradle wrapper (copied from the Initializr starter, a localgradle, or Docker, never hand-written). -
checkstyle.xmlandspotbugs-exclude.xmlat the repository root (Java), if absent (an existing one follows the Step 0 answer, Keep by default; on Update the generated-source matches are added tospotbugs-exclude.xmlif missing). -
A report stating whether the reactor was generated from scratch or updated, the action per file (created / updated / replaced / kept as is, with each mismatch left in a kept file), and listing the reactor’s build order, every version pinned (separating those copied from the reference pom from those looked up on Maven Central), which module each significant dependency landed in, anything that couldn’t be placed, any hexagon violation found, a note when Sonar is configured but
ci.enabledisfalse, howsonar.modewas wired (none,cloud, orself-hosted, with the resolved host/organization/project key), and howfrontendwas wired (none, orhillawith the resolvedvaadin.version).
The generated files' bytes come from template files under templates/ (and, where a template needs variant-specific notes, reference/) in .claude/skills/iru-setup-java-springboot-pom/; the skill reads only the files for the variant it resolved, not the whole set, which keeps its SKILL.md small.
Execution flow
Dependencies
Invokes
None — it reads springboot-stack.yml and the Spring Initializr API and writes the build files itself. Its only delegation is to the iru-gate-runner agent for verification (see Related agents).
Invoked by
-
Setup Java Spring Boot — Step 8, root build: Maven reactor or Gradle KTS catalog and convention plugins, via the
iru-isolated-skill-executoragent. -
Setup Java Spring Boot GitHub Workflows — Step 0, conditionally offered when Sonar wiring is missing from the build.
Receives mode, and on-existing only when that arrived in the orchestrator’s own args. If the root pom is kept as is
but is not a usable pom-packaged reactor, the bootstrap stops there.
Also runs standalone (/iru-setup-java-springboot-pom) to regenerate or update the reactor from an updated manifest.
Related agents
-
iru-gate-runner— spawned for Step 6’s verification (Mavenvalidateanddependency:tree, or the Gradle wrapper’shelp,buildanddependenciesruns), since a multi-module log is exactly the kind of output that shouldn’t land in the caller’s context.
Source
SKILL.md on GitHub — the file this page was generated from.