Setup Java Library
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Generate (or update) pom.xml at the repository root for a Java library from an explicit, genericized example
template, and scaffold the standard Maven source layout for the library’s base package.
Purpose
iru-setup-java-library bootstraps a new Java/Maven library’s pom.xml from a house template embedded in the skill
itself — the same test dependencies (junit-jupiter, junit-platform-launcher, mockito-core,
mockito-junit-jupiter), the same build-extras profile, and the same build/reporting plugins, with only
the project-identity fields filled in per repository. Whether the repository is open source, whether it publishes
to Maven Central (gating the sign profile and the central-publishing-maven-plugin), and whether to wire up a
SonarQube/SonarCloud scan (gating the sonar.* properties and the sonar-maven-plugin) are also resolved — asked
interactively, deriving publish/sonar recommendations from the open-source answer (and, for Sonar, the
repository’s visibility), or pre-supplied via args.
The skill announces whether it is creating pom.xml from scratch or updating an existing setup. If a pom.xml
already exists it warns, names any contradiction between the file and this run’s answers, and asks Update (merge the
template in, keeping custom dependencies/plugins), Keep as is, Replace from the example, or Stop — unless
on-existing in args decides. Existing source folders are always left untouched.
It also creates the src/main/java/<package>, src/main/resources/<package>, and src/test/java/<package>
folders for the library’s base package.
Plugin
Shipped by the iru-java plugin of the ai-catalog marketplace (install with /plugin install iru-java@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Pre-resolved parameters passed by an orchestrating skill (e.g. Setup Java Library Repository)
as newline-separated |
None — if absent or unrecognized, every field is asked interactively. |
open-source |
No (unless resolved via |
Whether the repository is open source ( |
None — user must choose |
publish |
No (unless resolved via |
Whether the generated |
|
visibility |
No |
|
Detected or asked |
ci |
No |
|
|
on-existing |
No |
|
|
sonar |
No (unless resolved via |
Whether to wire up a SonarQube/SonarCloud scan via the |
|
sonar-organization / sonar-project-key / sonar-host-url |
Only when |
|
See defaults above |
groupId |
Yes (unless supplied via |
Maven groupId, e.g. |
None |
artifactId |
Yes (unless supplied via |
Maven artifactId, e.g. |
None |
version |
No |
Project version. |
|
Java version |
No |
Java language level the library targets, written to |
|
Library package |
Yes (unless supplied via |
Base Java package for the library’s main source (need not equal groupId), used for the
|
None |
Developer name / email / organizationUrl |
Yes (unless supplied via |
Populates the |
None |
License |
Yes (unless supplied via |
Resolved via |
None — user must choose |
Outputs
-
pom.xmlat the repository root: created fresh, updated in place (merging the template into the existing file, shown as a diff for approval before writing), replaced entirely, or left as is, depending on the Step 1 choice.-
Conditional blocks: the
signprofile and thecentral-publishing-maven-pluginplugin entry are included only whenpublish: yes(thebuild-extrasprofile is always kept, regardless ofpublish); the foursonar.*properties and thesonar-maven-pluginplugin entry are included only whensonariscloudorself-hosted, omitted entirely whensonar: none.
-
-
src/main/java/<package>,src/main/resources/<package>, andsrc/test/java/<package>created if not already present (empty directories won’t show up ingit statusuntil they contain a file). -
A report starting with whether the run created from scratch or updated, and the action on
pom.xml(created, updated, replaced, kept as is, or stopped; user answer oron-existing), then the resolved groupId/artifactId/version, the license chosen (or "none"), the inferred repository information, and which source folders were created versus already present (existing ones reported as kept as is), each mismatch between a keptpom.xmland this run’s values, a note that no CI step sends Sonar reports ifci: nowith Sonar configured, plus an explicit statement of which conditional blocks were included versus omitted (open-source,publish,sonar) and why — plus an explicit warning to review the generatedpom.xmlbefore building or committing.
Execution flow
Dependencies
Invokes
None — iru-setup-java-library is a leaf skill; it does not call any other skill in this catalog.
Invoked by
-
Setup Java Library Repository — Step 3 runs
iru-setup-java-libraryfirst (always, even for an existing repository), passing the pre-resolved groupId, artifactId, package, developer name/email/organizationUrl, license, Java version,open-source/publish/sonar,visibility,ci, and (when supplied)on-existingviaargsaskey: valuelines so this skill’s own Step 2 questions are skipped and the user isn’t asked twice.
Source
SKILL.md on GitHub — the file this page was generated from.