Generated Modules

Every module contains a full src/ scaffold (src/main/java, src/main/resources, src/test/java, src/test/resources) with a package-info.java in each module’s primary leaf package under src/main/java only — never src/test/java, since Java rejects two package-info.java files compiled for the same package. (acceptance-tests is the exception worth calling out: its real test content — the *AT classes — lives under src/test/java, but its lone package-info, under src/main/java, still describes "Functional acceptance tests for the application.")

Every module that the app composes also carries a Spring @Configuration class in a .config sub-package; the app module’s Application class `@Import`s them all (each referenced by simple name via its own import statement) so the whole tree assembles into a single Spring context.

Module Naming

Throughout this page each module is referred to by its directory name (e.g. common-domain). A module’s Maven artifactId is the project artifactId, followed by -, followed by that directory name. For a project generated with artifactId=my-service, the common-domain module’s artifactId is my-service-common-domain, and the aggregator/BOM under parent/ is my-service-parent. Every module inherits its groupId and version from parent/. This prefix applies to `artifactId`s only — the directory names and Java package names listed below are unaffected.

Several modules also carry a Maven <name>/<description> derived from the appName prompt (see appName-Derived Naming).

appName-Derived Naming

appName (e.g. Order Service) drives the <name>/<description> of these modules. The area name is folded into named service areas' service-{name}/domain-service-{name} naming (trailing for <name>, mid-sentence for prose); other modules use appName as-is.

Module <name> <description>
parent/ ${appName} Parent ${appName}'s parent POM.
common-testing ${appName} Common Testing ${appName}'s common testing.
domain-{type} (REST) ${appName} Domain REST ${appName}'s REST presentation tier domain classes.
domain-{type} (GraphQL) ${appName} Domain GraphQL ${appName}'s GraphQL presentation tier domain classes.
presentation-graphql ${appName} Presentation GraphQL ${appName}'s GraphQL presentation tier.
domain-service[-{name}] ${appName} Domain Service[ {Area}] ${appName}'s[ {area}] service tier domain classes.
service[-{name}] ${appName} Service[ {Area}] ${appName}'s[ {area}] service tier (business logic).
app ${appName} App ${appName}'s application configuration including building its deployment assembly.
acceptance-tests ${appName} Acceptance Tests ${appName}'s acceptance tests.

common-domain, presentation-rest, and the per-integration modules (domain-{type}-{name}, integration-{type}-{name}) have no dedicated appName-derived <name>/description yet and keep their existing generic description text.

spring.application.name in app’s `application.properties uses appName’s generated-property form (spaces removed, lowercased), e.g. `orderservice.

Fixed Modules

These modules are always generated regardless of input.

common-domain
Domain classes shared across all other modules. No dependencies on other generated modules.

Package: {base.package}.common.domain

common-testing
Shared test infrastructure.

Package: {base.package}.common.testing
Depends on: common-domain and every other domain module (domain-{type}-{name}, domain-service/domain-service-{name}, domain-{type} presentation domain modules). No domain module depends back on common-testing — only service/service-{name} does — so this stays acyclic.
Spring (includeSpring=true): spring-boot-starter-test at compile scope; additionally spring-boot-starter-graphql-test at compile scope when a graphql presentation is present. Carries RestAcceptanceTestBase (when a rest presentation is present) and/or GraphQlAcceptanceTestBase (when a graphql presentation is present) — shared @SpringBootTest(webEnvironment = RANDOM_PORT) base classes that acceptance-tests’ `AppRestAcceptanceTestBase/AppGraphQlAcceptanceTestBase extend.

service or service-{name}
Business logic for a service area (see the serviceAreas prompt).

Package: {base.package}.service or {base.package}.service.{name}
Depends on: common-domain, its own domain-service / domain-service-{name} module, and the integration module(s) it consumes — a named area takes the integration sharing its name, while the single default service takes every integration module; if includeSpring=true, also common-testing (test scope)

domain-service or domain-service-{name}
Domain classes owned by a service area — one per service / service-{name} module.

Package: {base.package}.domain.service or {base.package}.domain.service.{name}
Depends on: common-domain; if includeSpring=true, also spring-boot-starter-validation (no domain module depends on common-testing)

app
Application assembly — produces the runnable artifact (e.g. Spring Boot über-jar). If includeSpring=true, app is always a monitorable web service regardless of presentationTypes — it adds the core spring-boot-starter, spring-boot-starter-webmvc, spring-boot-starter-actuator, and spring-boot-admin-starter-client (actuator needs a web server to expose its endpoints), and always generates an AppServletInitializer (WAR deployment) class; a database integration additionally adds spring-boot-starter-data-jpa and @EnableTransactionManagement. Contains the Spring Boot Application (@SpringBootApplication) class in {base.package}.app.config. Also creates application.properties (actuator, Spring Boot Admin registration, logging defaults, plus JPA and SQL logging when a database integration is present) and six empty per-environment files (application-{ci,dev,local,prod,qa,uat}.properties) in src/main/resources.

Package: {base.package}.app, {base.package}.app.config
Depends on: all non-test modules (common-domain, all domain and integration modules, all service modules and their domain-service modules, all presentation modules)

acceptance-tests
Functional acceptance tests that exercise the application from the outside.

Package: {base.package}.at
Depends on: app, common-domain, all domain-{type}-{name} integration domain modules, all domain-service / domain-service-{name} service-area domain modules, all domain-{type} presentation domain modules (all labeled "this app" in the pom); also common-testing (test scope) unconditionally, and — if includeSpring=true and a database integration is present — datasource-proxy-spring-boot-starter (SQL logging), plus spring-graphql-test (test scope) when a graphql presentation is present
Plugin: maven-failsafe-plugin (integration-test + verify goals)
Spring (includeSpring=true): generates {appNameClass}AcceptanceTestConfiguration (package {base.package}.at.config) and src/test/resources/logback-spring.xml; generates AppRestAcceptanceTestBase (package {base.package}.at, extends common-testing’s `RestAcceptanceTestBase) when a rest presentation is present, and/or AppGraphQlAcceptanceTestBase (extends GraphQlAcceptanceTestBase) when a graphql presentation is present — both @ContextConfiguration’d with the AT configuration class plus every generated module’s `@Configuration class (reachable transitively via the app dependency), and excluding DataSourceAutoConfiguration/XADataSourceAutoConfiguration only when a database integration is present.

Integration Modules

Generated per type:name pair in the integrations prompt. The database type is abbreviated to db in all names.

domain-{type}-{name}
Domain classes for a specific integration (e.g. domain-db-users, domain-rest-orders).

Package: {base.package}.domain.{type}.{name}
Depends on: common-domain

integration-{type}-{name}
Integration implementation classes — DAOs, Spring Data JPA repositories, REST clients, etc. (e.g. integration-db-users, integration-rest-orders).

Package: {base.package}.integration.{type}.{name}
Depends on: common-domain, domain-{type}-{name}; if includeSpring=true and the type is database, also datasource-proxy-spring-boot-starter (SQL logging)
Plugin: maven-failsafe-plugin (integration-test + verify goals)

Presentation Modules

Generated per type in the presentationTypes prompt.

domain-{type}
Domain classes for a presentation tier (e.g. domain-rest, domain-graphql) — these map to/from the service-tier domain objects ("the service domain deps").

Package: {base.package}.domain.{type}
Depends on: common-domain, every domain-service/domain-service-{name} module; if includeSpring=true, also spring-boot-starter-validation

presentation-{type}
Request-handling classes — controllers, resolvers, etc. (e.g. presentation-rest, presentation-graphql).

Package: {base.package}.presentation.{type}
Depends on: common-domain, domain-{type}, and all service modules

Parent POM

parent/pom.xml is the aggregator and BOM for all sibling modules. There is no pom.xml at the project root — parent/ is a sibling of all other modules.

It contains:

  • <parent> — inherits spring-boot-starter-parent (4.1.0) via an empty <relativePath/>, supplying Spring dependency management and plugin defaults
  • <packaging>pom</packaging>
  • <name>/<description> derived from appName (see appName-Derived Naming)
  • <modules> — all sibling modules referenced as ../module relative paths, sorted alphabetically
  • <dependencyManagement> — every module pinned to ${project.version}, split into a TEST section (acceptance-tests and common-testing, at <scope>test</scope>) and a PROD section (all other modules, plus managed third-party dependencies such as spring-core, datasource-proxy-spring-boot-starter, and spring-boot-admin-starter-client — the latter two pinned via their own version properties since they aren’t part of the Spring Boot BOM)
  • Common properties: Java 21 via maven.compiler.release; UTF-8 source encoding
  • <pluginManagement> — pinned versions for maven-compiler-plugin, maven-failsafe-plugin, maven-jar-plugin (with skipIfEmpty=true), maven-surefire-plugin, modernizer-maven-plugin (bound to verify, javaVersion = ${java.version}), and versions-maven-plugin (rule set ignores alpha/beta/milestone/RC versions)
  • <plugins> — activates modernizer-maven-plugin so every module is checked for outdated API usage during verify

To build a generated project:

cd my-service/parent
mvn verify

Use mvn install instead if other local projects need to consume the generated modules from your local Maven repository.

Updating dependency and plugin versions

parent/ also contains two convenience scripts that wrap mvn versions:update-properties, bumping every dependency and plugin version property in parent/pom.xml to its latest stable release in a single command:

Script Platform
mvn-update-properties-versions.sh Linux / macOS
mvn-update-properties-versions.ps1 Windows (PowerShell)

Run the applicable script from parent/ immediately after generating the project to pick up the newest versions before your first build:

cd my-service/parent
./mvn-update-properties-versions.sh

The full plugin output is written to parent/target/version-updates-applied.log. Pre-release versions (alpha, beta, milestone, RC) are skipped by the versions-maven-plugin rule set, so only stable releases are applied.

Package Reference

All type and name segments in package names are lowercased.

Module Package
common-domain {base.package}.common.domain
common-testing {base.package}.common.testing
domain-{type}-{name} {base.package}.domain.{type}.{name}
integration-{type}-{name} {base.package}.integration.{type}.{name}
service {base.package}.service
service-{name} {base.package}.service.{name}
domain-service {base.package}.domain.service
domain-service-{name} {base.package}.domain.service.{name}
domain-{type} {base.package}.domain.{type}
presentation-{type} {base.package}.presentation.{type}
app {base.package}.app
acceptance-tests {base.package}.at