Java Service Archetype

Maven archetype that generates a structured multi-module Java service app and optionally using Spring Boot with integration, service, and presentation architectural tiers.

Describe the application’s integrations, service areas, and presentation architectural tiers at generation time; the archetype builds the full module tree and wires up all POMs.

Quick Start

mvn archetype:generate \
  -DarchetypeGroupId=io.github.jeffjensen \
  -DarchetypeArtifactId=java-service-archetype \
  -DarchetypeVersion=VERSION

Replace VERSION with the archetype release you want to use.

Maven prompts for appName and integrations first (the two required properties with no default), then the standard coordinates (groupId, artifactId, package), then confirms. serviceAreas, presentationTypes, and includeSpring have defaults and are not prompted interactively. See Usage for the full prompts reference.

Example Output

Given integrations=database:users,rest:orders, a blank serviceAreas, and presentationTypes=rest, the archetype produces:

my-service/
├── parent/                     (aggregator POM — build entry point)
│   └── pom.xml
├── acceptance-tests/
├── app/
├── common-domain/
├── common-testing/
├── domain-db-users/            (integration domain — database:users)
├── domain-rest/                (presentation domain — presentationTypes=rest)
├── domain-rest-orders/         (integration domain — rest:orders)
├── integration-db-users/
├── integration-rest-orders/
├── presentation-rest/
└── service/

parent/ is a sibling directory — there is no pom.xml at the project root. Each module contains a full src/ scaffold and a package-info.java in every src/main/java leaf package (never under src/test/java, since Java rejects two package-info.java files compiled for the same package).

See Modules for a description of each module, its dependencies, and how to build.