Setup Java Library Repository

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

End-to-end bootstrap for a Java/Maven library repository, new or existing. It collects the project’s identity, pipeline parameters, and open-source/visibility/CI/publish/Sonar choices once, announces whether it is setting up from scratch or updating, then orchestrates six other skills in a fixed order so nothing is asked twice.

Purpose

iru-setup-java-library-repository is the stack orchestrator for starting (or catching up) a Java/Maven library repository — runnable standalone or delegated to by Setup Repository. Rather than duplicating the logic of pom.xml generation, documentation scaffolding, .gitignore setup, CI/CD and security workflows, changelog bootstrapping, and README generation, it gathers the shared inputs — project identity (groupId, artifactId, base package, developer name/email/organizationUrl, license), pipeline parameters (integration branch, Java version, publishing server id, sign/extras profile ids, Maven settings file), and whether the project is open source, publishes to Maven Central, and runs SonarCloud, self-hosted SonarQube, or no Sonar analysis — once, and passes each downstream skill only what it needs.

Step 0 first parses an optional args block (mode, open-source, visibility, ci, ci-tests, pages, publish, sonar plus its sonar-organization/sonar-project-key/sonar-host-url detail keys, and on-existing) so a caller like Setup Repository can pre-resolve these and skip the matching questions. It then prints a Setup mode announcement: "from scratch" when mode: new and nothing owned is on disk, otherwise "updating an existing repository" with an inventory table marking each component (build manifest, source layout, Sonar config, Antora docs, .gitignore, workflows, Dependabot, changelog, README, license) as absent, present, or partial.

The orchestrator never asks a keep/update/replace question itself: iru-setup-java-library is now always invoked (even in mode: existing), and each component sub-skill warns about the prior artifact it finds and asks Update / Keep as is / Replace (Stop where offered), unless a forwarded on-existing decides for it.

Step 2 gives cost-aware recommendations for private repositories: the Actions minutes budget (2,000/month on GitHub Free, 3,000 on Pro and Team, 50,000 on Enterprise Cloud, per GitHub’s current pricing), SonarCloud being free only for public/open-source projects, and GitHub Pages needing a paid plan (and being public) for private repositories.

Purpose group

Plugin

Shipped by the iru-java plugin of the ai-catalog marketplace (install with /plugin install iru-java@ai-catalog; see Plugins).

Invocation

/iru-setup-java-library-repository

Optionally with an args block (key: value lines) to pre-resolve mode, open-source, visibility, ci, ci-tests, pages, publish, sonar (plus its detail keys), and on-existing, and skip the matching questions — this is how Setup Repository drives it.

Inputs

Argument Required Description Default

groupId, artifactId, base package, developer name/email/organizationUrl

Yes

Free-text project-identity fields, asked directly in plain conversation in Step 1.

None

License

Yes

Resolved once via AskUserQuestion: Apache License 2.0, MIT License, No license, or Other (asked for a display name and URL directly).

None — user must choose

Integration branch

No

Branch that CI treats as the integration branch, fed to iru-setup-java-github-workflows.

develop

Java version

No

Java version the CI pipeline builds against, and the maven.compiler.source/maven.compiler.target level iru-setup-java-library writes into the generated pom.xml.

21

Publishing server id

No

Maven Central (or equivalent) publishing server id.

central

Extras profile id

No

Maven profile id for building extra artifacts (sources/javadoc jars).

build-extras

Sign profile id

No

Maven profile id for GPG-signing artifacts.

sign

Maven settings file

No

Settings file used by the CI workflows for authentication.

mvnsettings.xml

mode (args)

No

new or existing. If unset: defaults to existing (confirmed via AskUserQuestion) when pom.xml already exists at the repository root, otherwise new without asking. Drives the Setup mode announcement; it no longer skips iru-setup-java-library (which handles an existing pom.xml itself).

existing if pom.xml exists, else new

open-source (args)

No

Whether the repository is open source. Drives the recommended defaults for sonar and publish.

Asked directly, no default

visibility (args)

No

public, private, or internal (treated like private for cost decisions). Warns if open source but not public.

Detected via gh repo view; otherwise asked, public recommended when open source, else private

ci (args)

No

yes or no. no skips Step 6 entirely (no workflows, security.yml, Dependabot config, or sync script) and skips the ci-tests/pages questions. For private repositories the minutes budget is stated.

Asked, yes recommended

ci-tests (args)

No

unit (Surefire *Test only; Failsafe *IT stay local) or full (unit plus integration tests). Only asked when ci: yes.

Asked; full recommended for public, unit for private/internal

pages (args)

No

yes or no. no means CI builds the Antora docs and Maven site and uploads them as a workflow artifact only. Only relevant when ci: yes.

yes without asking for public; asked for private/internal, no recommended

publish (args)

No

Whether to publish to Maven Central.

yes if open source; otherwise asked, no recommended

sonar (args)

No

cloud, self-hosted, or none. When cloud/self-hosted, also collects sonar-organization/ sonar-project-key/sonar-host-url. With ci: no, only the pom.xml side is configured and no CI step sends reports.

cloud if open source and public; otherwise asked, none recommended

on-existing (args)

No

ask, keep, update, or replace: how every component sub-skill treats prior setup. Scripted runs only; never asked here and forwarded only when supplied.

ask (each sub-skill asks per artifact)

Outputs

  • pom.xml and the src/main/java/src/main/resources/src/test/java source folders for the base package (via iru-setup-java-library) — created, or, if pom.xml already exists, updated, kept as is, or replaced per that skill’s own question.

  • A scaffolded Antora documentation site under docs/ (via iru-setup-antora).

  • A root .gitignore covering the build tool, IDE files, and the Antora build output (via iru-setup-java-gitignore).

  • develop.yml/main.yml/sync.yml/security.yml GitHub Actions workflows, .github/dependabot.yml, and the .github/scripts/sync_versions.py script (via iru-setup-java-github-workflows), with the Maven Central publish step and the SonarCloud/self-hosted SonarQube scan step present or absent according to publish/sonar, and honouring ci-tests and pages. Nothing is generated when ci: no.

  • A root CHANGELOG.md backfilled from git/GitHub release history (via iru-setup-changelog).

  • A root README.md with badges, a project-status table, documentation links, and installation instructions (via iru-setup-readme).

  • A final report summarizing the resolved identity/license/pipeline parameters, the setup mode (from scratch or updating), a per-component table with the action taken (created / updated / replaced / kept as is / skipped (ci: no) / stopped, plus any mismatch listed for a kept file), the required GitHub secrets, and an explicit disclosure of the open-source/visibility/ci/ci-tests/pages/publish/sonar wiring decisions (what was included in pom.xml and the workflows, and why anything was omitted, including the included-minutes note for private repositories). Ends with a warning to review every generated file before building, committing, or relying on CI.

Execution flow

flowchart TD Z["Step 0: Parse args\n(mode, open-source, visibility, ci, ci-tests,\npages, publish, sonar & detail keys, on-existing)"] --> Y["Announce setup mode:\nfrom scratch or updating\n(component inventory)"] Y --> A["Step 1: Collect project identity\n(groupId, artifactId, package,\ndeveloper info, license)"] A --> B["Step 2: Collect pipeline parameters and choices\n(branch, Java version, server/profile ids, settings file,\nopen-source, visibility, ci, sonar, ci-tests, pages, publish)"] B --> E["Step 3: Run setup-java-library\n(pom.xml + source folders, via sub-agent;\nasks Update/Keep/Replace/Stop if pom.xml exists)"] E -- user chose stop --> F[Stop entire pipeline; report] E -- ok --> G["Step 4: Run setup-antora\n(documentation site, via sub-agent)"] G --> H["Step 5: Run setup-java-gitignore\n(root .gitignore, via sub-agent)"] H --> C{"Step 6: ci: no?"} C -- yes --> D["Skip workflows, security.yml,\ndependabot.yml and sync script"] C -- no --> I["Run setup-java-github-workflows\n(passing open-source, visibility, ci-tests,\npages, publish, sonar, via sub-agent)"] I -- user chose stop --> J D --> J["Step 7: Run setup-changelog\n(root CHANGELOG.md, via sub-agent)"] I --> J J --> K["Step 8: Run setup-readme\n(root README.md, via sub-agent)"] K --> L["Step 9: Report per-component outcome,\nwiring decisions, and review warnings"]

Dependencies

Invokes

Each of the following is invoked via the iru-isolated-skill-executor agent rather than a direct Skill call — every sub-skill re-derives what it needs straight from the filesystem this orchestrator has just written to, so only a short completion summary needs to come back, keeping each sub-skill’s own exploration/file reads out of this orchestrator’s own context:

  • Setup Java Library — Step 3, first: writes pom.xml and the source folders, passing Step 1’s answers (groupId, artifactId, package, developer name/email/organizationUrl, license) plus Step 2’s Java version, open-source/publish/sonar (+ detail keys), visibility, ci, and on-existing (only when supplied) as args key: value lines so iru-setup-java-library doesn’t ask for them again — and so the pom.xml compiler level and publish/Sonar wiring matches the workflows Step 6 generates. Always invoked, even in mode: existing; it asks Update / Keep / Replace / Stop about an existing pom.xml itself.

  • Setup Antora — Step 4: scaffolds the Antora documentation site, invoked with no args (or only on-existing, when supplied) since it derives the component name/title/version directly from the pom.xml Step 3 just wrote. It asks Update / Keep / Replace itself for an existing site.

  • Setup Java Gitignore — Step 5: writes or updates the root .gitignore, invoked with no args (or only on-existing, when supplied) since it explores the repository directly (including what Steps 3–4 just wrote).

  • Setup Java GitHub Workflows — Step 6 (skipped entirely when ci: no): writes the CI/CD and security workflows (develop.yml/main.yml/sync.yml/security.yml/.github/dependabot.yml), passing Step 2’s pipeline parameters (integration branch, Java version, publishing server id, extras/sign profile ids, settings file, open-source/publish/sonar + detail keys, visibility, ci-tests, pages, mode, and on-existing when supplied) plus Step 1’s already-collected groupId/artifactId as args key: value lines, so that skill’s own survey doesn’t need to re-read them from pom.xml and stays in agreement with what Step 3 wrote there.

  • Setup Changelog — Step 7: bootstraps the root CHANGELOG.md, invoked with no args (or only on-existing, when supplied) since it works from the repository’s own git tag/GitHub Release history. It asks Keep / Update / Replace itself for an existing file.

  • Setup Readme — Step 8, last: bootstraps the root README.md, passing sonar, ci, pages (no when ci: no), and on-existing when supplied, so Sonar badges, CI badges, and the github.io link match the choices made; it explores the finished state left by every earlier step for everything else.

Invoked by

  • iru-isolated-skill-executor — spawned once per sub-skill (Steps 3–8), so all six sub-skills' own exploration/file-read transcripts don’t accumulate in this orchestrator’s context over the course of a single bootstrap run.

Source

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