This is a template repository for creating java-modules for cui-open-source-projects. This incorporates all necessary java-structures, including pom.xml, sensible project-documentation,
an predefined github pipelines.
It is meant to be used as copy-paste-template.
This template provides an automated customization process to easily update all relevant project files:
-
Configure your project properties in
customization.properties -
Run the customization script:
./customize.sh
The script will update all required files with your project-specific information.
After running the script, you can review the changes in your git repository. The script will not commit or push any changes automatically, allowing you to verify them first.
After reviewing the changes,
you delete the files customization.properties and ./customize.sh you can commit them to your repository.
Create a new Repository by clicking "Use this template"
If not using the automated customization process, manually replace all occurrences of cui-java-module-template with the new project 'key' / name, e.g. my-java-module. Relevant Files are:
|
Caution
|
The key must not contain spaces. They are used for creating urls as well. |
-
README.adoc→ the badges on top -
pom.xml -
.github/project.yml→name,description,sonar.project-key,pages.referenceonly -
CLAUDE.md,.claude/skills/release/SKILL.md→ the repository slug -
src/site/site.xml -
src/site/asciidoc/about.adoc
|
Warning
|
Do not touch |
All secrets (GPG, Sonatype, Sonar, Release App) are managed at the cuioss organization level. The caller workflows pass them explicitly to the reusable workflows; pass only the secrets a reusable workflow declares, an undeclared one makes every run end in startup_failure. No repo-level secrets need to be configured.
-
cuioss-organization: add the repository to
consumers:in.github/project.yml, so every org workflow release opens the pin-bump PR here. Apply repository settings and branch protection (merge queue) with the org’srepo-settingsandbranch-protectionscripts. -
SonarCloud: create the project
cuioss_<key>. New projects start with a main branch calledmaster; rename it tomain(Administration → Branches and Pull Requests) before the first analysis. Otherwisemainis analysed as a short-lived branch and the overview stays empty. If it already happened: delete the short-livedmain, then renamemaster. Set New Code to "Previous version". The first analysis of the renamed branch reports quality gateNONE(no baseline yet), which failssonar.qualitygate.wait; the next analysis is green. -
Release: leave
release.current-versionalone, see Releasing.
-
Verify that the customization was applied correctly to all files
-
If you’re using manual customization:
-
pom.xml: Adjustnameanddescriptionelements -
Adjust
module-infoaccordingly -
pom.xml: Adjust propertymaven.jar.plugin.automatic.module.nameaccording to yourmodule-info
-
-
src/site/asciidoc/about.adoc: Adjust content -
Review / Enable the elements under 'Security' Tab
-
Review / Add Collaborators
-
Add (link) the resulting maven-documentation: github.io-documentation
The customization.properties file controls how the project is customized:
# Used in pom.xml (artifactId), README.adoc (badges), .github/project.yml (name, pages-reference) src/site/site.xml (links), SECURITY.md (links)
project.key=cui-java-module-template
# Used in pom.xml (<n> tag)
project.name=cui java module template
# Used in pom.xml (<description> tag)
project.description=Template module for cuioss open source projects.
# Used in pom.xml (property maven.jar.plugin.automatic.module.name)
project.moduleName=de.cuioss.template
# Used in pom.xml (groupId, README.adoc (badges))
project.groupId=de.cuiossThe script automatically derives additional properties:
* project.scm.url - SCM URL based on the project key
* project.pages.url - GitHub Pages URL based on the project key
* project.sonar.id - Sonar ID based on the project key
Merging a change of release.current-version in .github/project.yml is a release: the central
guard in reusable-maven-release.yml publishes to Maven Central whenever that value differs from the
merge commit’s first parent and no tag for it exists. Maven Central releases cannot be withdrawn.
Every other project.yml edit reaches the release workflow too and is refused by the guard.
-
This template declares
current-version: 0.1.0together with0.1.0-SNAPSHOTinpom.xml, so a new repository never has to touch the value. Its first release is a deliberateworkflow_dispatchfrommain. -
Every later release goes through the runbook
.claude/skills/release/SKILL.md: a dedicatedchore/release_<version>PR that changes nothing but the version, merged only after the pre-cut checks. -
The release workflow excludes this template repository itself, so it never publishes
cui-java-module-template.