Setup Java GitHub Workflows

This documentation was generated with the assistance of AI. Please report any inaccuracies.

Scaffold or update the develop.yml, main.yml, and sync.yml GitHub Actions workflows (plus the companion .github/scripts/sync_versions.py script) that make up a Java/Maven library’s CI/CD release pipeline.

Purpose

iru-setup-java-github-workflows wires up the full house pipeline for a Java/Maven repository: build and test, Checkstyle/PMD/SpotBugs static analysis, JaCoCo coverage and a Maven site report, a SonarQube/SonarCloud scan, an Antora documentation build, publishing both the Antora docs and the Maven site report to GitHub Pages, and publishing the release artifact to Maven Central. develop.yml runs this pipeline on every push to the integration branch; main.yml runs the same pipeline when a GitHub Release is published; sync.yml triggers on that same release-published event to open a pull request merging the released branch back into the integration branch and bumping the development snapshot version across pom.xml, README.md, and the Antora docs, via sync_versions.py. The skill ships generic, genericized example templates (derived from a real repository’s workflows) embedded in the skill file itself, and resolves every placeholder in them from a survey of the target repository rather than guessing. If any of the three workflow files already exist, it asks the user whether to stop or attempt an update using the templates as reference, preserving any step this skill doesn’t own (e.g. a Slack notification).

Purpose group

Invocation

/iru-setup-java-github-workflows

Inputs

Argument Required Description Default

args (key: value lines)

No

Pre-resolved values for the six pipeline parameters — integration-branch, java-version, publishing-server-id, extras-profile-id, sign-profile-id, and settings-file — plus, optionally, group-id/artifact-id if the caller already has them, passed one per line, e.g. integration-branch: develop. When an orchestrating skill (such as iru-setup-java-library-repository) supplies these, the corresponding fact-finding step in Step 1’s survey is skipped entirely for that value instead of asking the user again (or, for group-id/artifact-id, instead of re-reading pom.xml for values the caller already collected).

None — if args is absent or doesn’t match this key: value format, every parameter is instead resolved by surveying pom.xml and the repository (Maven coordinates, compiler version, publishing/signing/extras profiles, Sonar config, Antora setup, branch names, README/Antora version wording), asking the user directly for anything that can’t be inferred.

Outputs

  • .github/workflows/develop.yml, .github/workflows/main.yml, and .github/workflows/sync.yml — created fresh, or updated in place if any already existed and the user chose to continue.

  • .github/scripts/sync_versions.py, always written together with sync.yml — never one without the other.

  • Supporting files created if missing: sonar-project.properties (if Sonar values are supplied), and the Maven settings file used for deploy (default mvnsettings.xml), plus .gitignore entries for /docs/build/ and /target/ if absent.

  • A report of required repository secrets (SONAR_TOKEN, OSSRH_USERNAME/OSSRH_PASSWORD, SIGNING_KEY/SIGNING_KEY_ID/SIGNING_PASSWORD, and conditionally SONATYPE_STAGING_PROFILE_ID) and the repository setting that must be enabled for sync.yml to be able to open pull requests, plus any open gaps (missing Central plugin, missing signing profile, missing Antora setup, README/Antora wording that didn’t match `sync_versions.py’s default regexes).

Execution flow

flowchart TD A[Start /iru-setup-java-github-workflows] --> B["Step 1: Survey target repo\n(parse args first, then fill\nremaining gaps from pom.xml/repo)"] B --> C{"Do develop.yml/main.yml/\nsync.yml already exist?"} C -- none exist --> E["Step 3-4: Fill reference\ntemplates with survey values"] C -- any exists --> D{"Stop or continue\n(user choice)?"} D -- stop --> Z["Report which files exist;\nno changes made"] D -- continue --> E E --> F["Step 5: Create missing supporting\nfiles (sonar-project.properties,\nMaven settings XML, .gitignore entries)"] F --> G["Step 6: Write workflow files\nand sync_versions.py"] G --> H["Step 7: List required\nrepository secrets/settings"] H --> I["Step 8: Report and warn\nabout open gaps"]

Dependencies

Invokes

None — iru-setup-java-github-workflows is a leaf skill; it does not call any other skill in this catalog.

Invoked by

  • Setup Java Library Repository — Step 6 runs iru-setup-java-github-workflows (via the iru-isolated-skill-executor agent), passing the six pipeline parameters (integration branch, Java version, publishing server id, extras/sign profile ids, settings file) from its own Step 2, plus groupId/artifactId from its own Step 1, through args as key: value lines so it isn’t asked — or made to re-read pom.xml — for facts the orchestrator already has.

None — this skill does not delegate any part of its work to a built-in agent.

Source

SKILL.md on GitHub — the file this page was generated from.