Use when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning (OWASP), code formatting (Spotless), version management, container image build (Jib), build information tracking, and benchmarking (JMH) — through a consultative, modular step-by-step approach that only adds what you actually need. This should trigger for requests such as Add Maven plugins in pom.xml; Improve Maven plugins in pom.xml; Configure Maven quality plugins in pom.xml; Add Maven build lifecycle plugins for Java verification; Review Maven plugin versions and executions. Part of Plinth Toolkit
npx skills add https://github.com/jabrena/plinth --skill 112-java-maven-plugins
Configure Maven plugins and profiles in pom.xml using a structured, question-driven process that preserves existing configuration. This is an interactive SKILL.
What is covered in this Skill?
Maven plugins:
Maven profiles:
Before applying plugin recommendations, ensure the project is in a valid state. Use a structured, question-driven process that preserves existing configuration and adds only what the user selects.
./mvnw validate or mvn validate before applying any plugin recommendationsRun ./mvnw validate or mvn validate and stop if validation fails.
Before making any changes to pom.xml:
<build><plugins>, <build><pluginManagement>, and <reporting><plugins>.<properties>.<profiles>.Check for Maven Wrapper files in the project root:
mvnw and mvnw.cmd.mvn/wrapper/maven-wrapper.propertiesIf Maven Wrapper is not present, stop and ask:
"I notice this project doesn't have Maven Wrapper configured. The Maven Wrapper ensures everyone uses the same Maven version, improving build consistency across different environments. Would you like me to install it? (y/n)"
Wait for the user's response before asking any other question. If the user says "y", install it:
mvn wrapper:wrapper
Run this XML-included question flow before reading any plugin/profile implementation reference. Ask one question at a time, wait for the user's answer, and record selected plugins, profiles, and conditional values before continuing.
Question 1: What type of Java project is this?
Options:
Question 2: Which Java version does your project target?
Options:
Question 3: What build and quality aspects are important for your project?
Options:
Note: When "Cyclomatic Complexity" is selected, Step 20 will create a PMD ruleset file and profile. The ruleset location depends on project structure: src/main/pmd/pmd-cyclomatic-complexity.xml (mono-module) or pmd/pmd-cyclomatic-complexity.xml (multi-module).
Question 3.1 (conditional): What is your target container image for Jib?
Note: This question is only asked if "Container image build (Jib)" was selected in question 3.
gcr.io/my-project/my-app, docker.io/username/myimage, or myimage for local Docker<to><image> configurationQuestion 4: What is your target coverage threshold?
Options:
Note: This question is only asked if "Code coverage reporting (JaCoCo)" was selected in question 3.
Question 5: Do you want to configure Sonar/SonarCloud integration?** (y/n)
Note: This question is only asked if "Static code analysis (SpotBugs, Sonar)" was selected in question 3.
If yes, please provide the following information:
Question 5.1: What is your Sonar organization identifier?
my-github-user or my-company-orgQuestion 5.2: What is your Sonar project key?
GITHUB_USER_REPOSITORY_NAME (e.g., john-doe_my-java-project)john-doe_awesome-java-libQuestion 5.3: What is your Sonar project display name?
Awesome Java Library or My Microservice APIQuestion 5.4: Which Sonar service are you using? (conditional)
Note: This question is only asked if Sonar configuration was enabled in question 5.
Options:
If SonarQube Server: Please provide your SonarQube server URL (e.g., https://sonar.mycompany.com)
After all applicable questions are answered, confirm the selections and map them to references:
references/112-java-maven-plugins-maven-compiler-plugin.md.references/112-java-maven-plugins-maven-enforcer-plugin.md.references/112-java-maven-plugins-maven-surefire-plugin.md.references/112-java-maven-plugins-maven-failsafe-plugin.md.references/112-java-maven-plugins-maven-surefire-report-plugin.md and references/112-java-maven-plugins-maven-jxr-plugin.md.references/112-java-maven-plugins-spotless-maven-plugin.md.references/112-java-maven-plugins-versions-maven-plugin.md.references/112-java-maven-plugins-git-commit-id-maven-plugin.md.references/112-java-maven-plugins-flatten-maven-plugin.md.references/112-java-maven-plugins-jib-maven-plugin.md.references/112-java-maven-plugins-maven-dependency-plugin.md.references/112-java-maven-plugins-profile-jacoco.md.references/112-java-maven-plugins-profile-pitest.md.references/112-java-maven-plugins-profile-security.md.references/112-java-maven-plugins-profile-static-analysis.md.references/112-java-maven-plugins-profile-sonar.md.references/112-java-maven-plugins-profile-jmh.md.references/112-java-maven-plugins-profile-cyclomatic-complexity.md.Add selected plugins and profiles without removing existing ones, preserving project structure and compatibility. Add only the Maven properties, plugin configuration, profile configuration, reporting plugins, and support files required by the selected references.
Report added plugins/profiles, rationale, and recommended follow-up commands or checks.
For detailed guidance, examples, and constraints, see:
Expert in secure backend coding practices specializing in input validation, authentication, and API security. Use PROACTIVELY for backend security implementations or security code reviews.
This skill should be used when the user asks to "perform cloud penetration testing", "assess Azure or AWS or GCP security", "enumerate cloud resources", "exploit cloud misconfigurations", "test O365 security", "extract secrets from cloud environments", or "audit cloud infrastructure". It provides comprehensive techniques for security assessment across major cloud platforms.
You are a dependency security expert specializing in vulnerability scanning, license compliance, and supply chain security. Analyze project dependencies for known vulnerabilities, licensing issues, outdated packages, and provide actionable remediation strategies.
Comprehensive Flow Nexus platform management - authentication, sandboxes, app deployment, payments, and challenges
This skill should be used when the user asks to "escalate privileges on Linux", "find privesc vectors on Linux systems", "exploit sudo misconfigurations", "abuse SUID binaries", "exploit cron jobs for root access", "enumerate Linux systems for privilege escalation", or "gain root access from low-privilege shell". It provides comprehensive techniques for identifying and exploiting privilege escalation paths on Linux systems.
Expert malware analyst specializing in defensive malware research, threat intelligence, and incident response. Masters sandbox analysis, behavioral analysis, and malware family identification. Handles static/dynamic analysis, unpacking, and IOC extraction. Use PROACTIVELY for malware triage, threat hunting, incident response, or security research.
This skill should be used when the user asks to "use Metasploit for penetration testing", "exploit vulnerabilities with msfconsole", "create payloads with msfvenom", "perform post-exploitation", "use auxiliary modules for scanning", or "develop custom exploits". It provides comprehensive guidance for leveraging the Metasploit Framework in security assessments.
Expert in secure mobile coding practices specializing in input validation, WebView security, and mobile-specific security patterns. Use PROACTIVELY for mobile security implementations or mobile security code reviews.
Take jabrena/112-java-maven-plugins from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.