|
| 1 | += java-service-archetype |
| 2 | + |
| 3 | +Maven archetype that generates a structured multi-module Java service project. |
| 4 | +You describe your integrations, service areas, and presentation architectural tiers at generation time; |
| 5 | +the archetype builds the full module tree and wires up all POMs. |
| 6 | + |
| 7 | +== Generate a Project |
| 8 | + |
| 9 | +[source,bash] |
| 10 | +---- |
| 11 | +mvn archetype:generate \ |
| 12 | + -DarchetypeGroupId=io.github.jeffjensen \ |
| 13 | + -DarchetypeArtifactId=java-service-archetype \ |
| 14 | + -DarchetypeVersion=1.0.0-SNAPSHOT |
| 15 | +---- |
| 16 | + |
| 17 | +See the https://jeffjensen.github.io/java-service-archetype/[project site] for the full prompts reference, module structure, examples, and build instructions. |
| 18 | + |
| 19 | +== CI / CD |
| 20 | + |
| 21 | +Three GitHub Actions workflows are included. |
| 22 | + |
| 23 | +=== Build any branch (`build-any-branch.yml`) |
| 24 | + |
| 25 | +Runs `./mvnw clean verify` on every push and pull request. |
| 26 | +Documentation-only changes (`.adoc`, `.md`, `src/site/**`) are skipped — those pushes trigger the site publish directly instead. |
| 27 | + |
| 28 | +=== Deploy snapshot (`deploy-snapshot.yml`) |
| 29 | + |
| 30 | +Triggered when the build workflow succeeds on `main`. |
| 31 | +Publishes a `-SNAPSHOT` artifact to Maven Central (Sonatype). |
| 32 | +Release versions (without `-SNAPSHOT`) are skipped automatically. |
| 33 | + |
| 34 | +Required repository secrets: |
| 35 | + |
| 36 | +[cols="1,2"] |
| 37 | +|=== |
| 38 | +|Secret |Description |
| 39 | + |
| 40 | +|`CENTRAL_USERNAME` |Maven Central portal username |
| 41 | +|`CENTRAL_TOKEN` |Maven Central portal token |
| 42 | +|=== |
| 43 | + |
| 44 | +=== Publish site (`publish-docs.yml`) |
| 45 | + |
| 46 | +Triggered in three ways: when the build workflow succeeds on `main`; on any direct push to `main` that touches doc files (`.adoc`, `.md`, `src/site/**`); or manually via `workflow_dispatch`. |
| 47 | +Runs `./mvnw site` and publishes the Maven site to GitHub Pages. |
| 48 | + |
| 49 | +Enable GitHub Pages (repository Settings → Pages → Source: *GitHub Actions*) before the first run. |
0 commit comments