{"id":"10d71a6c-ab80-4490-a7e5-9a65b7712982","shortId":"2dkWEW","kind":"skill","title":"112-java-maven-plugins","tagline":"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 t","description":"# Maven Plugins: pom.xml Configuration Best Practices\n\nConfigure Maven plugins and profiles in pom.xml using a structured, question-driven process that preserves existing configuration. **This is an interactive SKILL**.\n\n**What is covered in this Skill?**\n\nMaven plugins:\n\n- Maven Compiler\n- Maven Enforcer\n- Maven Surefire\n- Maven Failsafe\n- HTML test reports (Surefire Report, JXR)\n- Maven Spotless\n- Maven Flatten\n- Maven Versions\n- Maven Git Commit ID\n- Maven Jib\n\nMaven profiles:\n\n- JaCoCo (code coverage)\n- PiTest (mutation testing)\n- Security (OWASP dependency check)\n- Static analysis (SpotBugs, PMD)\n- SonarQube/SonarCloud\n- JMH (Java Microbenchmark Harness)\n- Cyclomatic complexity\n\n## Constraints\n\nBefore 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.\n\n- **MANDATORY**: Run `./mvnw validate` or `mvn validate` before applying any plugin recommendations\n- **SAFETY**: If validation fails, stop and ask the user to fix issues—do not proceed until resolved\n- **SCOPE**: Begin with Step 1 (existing configuration analysis) before any changes. Never remove or replace existing plugins; only add new ones that do not conflict\n- **BEFORE APPLYING**: Read the reference for detailed plugin configurations, XML templates, and constraints for each step\n\n## When to use this skill\n\n- Add Maven plugins in pom.xml\n- Improve Maven plugins in pom.xml\n\n## Workflow\n\n1. **Validate project before plugin changes**\n\nRun `./mvnw validate` or `mvn validate` and stop if validation fails.\n\n2. **Analyze current plugin and profile configuration**\n\nStart with existing configuration analysis to identify what is already declared and avoid conflicts or replacement.\n\n3. **Read plugin reference and collect selections**\n\nRead `references/112-java-maven-plugins.md`, then use a question-driven flow to select only needed plugins/profiles.\n\n4. **Add non-conflicting plugin configuration**\n\nAdd selected plugins and profiles without removing existing ones, preserving project structure and compatibility.\n\n5. **Summarize applied plugin setup**\n\nReport added plugins/profiles, rationale, and recommended follow-up commands or checks.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/112-java-maven-plugins.md](references/112-java-maven-plugins.md).","tags":["112","java","maven","plugins","cursor","rules","jabrena","agent-skills","ai-skills","claude","claude-code","claude-code-skills"],"capabilities":["skill","source-jabrena","skill-112-java-maven-plugins","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/112-java-maven-plugins","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,405 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T18:53:40.497Z","embedding":null,"createdAt":"2026-04-18T22:01:51.589Z","updatedAt":"2026-04-26T18:53:40.497Z","lastSeenAt":"2026-04-26T18:53:40.497Z","tsv":"'/mvnw':163,254 '1':194,247 '112':1 '2':264 '3':287 '4':308 '5':329 'ad':335 'add':11,155,208,236,309,315 'alreadi':280 'analysi':120,197,275 'analyz':265 'appli':132,169,216,331 'ask':179 'avoid':283 'begin':191 'best':48 'build':39,41 'chang':200,252 'check':118,345 'code':32,110 'collect':292 'command':343 'commit':103 'compat':328 'compil':82 'complex':129 'configur':13,47,50,67,153,196,223,270,274,314 'conflict':214,284,312 'constraint':130,227,352 'contain':37 'cover':75 'coverag':111 'current':266 'cyclomat':128 'declar':281 'depend':117 'detail':221,348 'driven':62,148,301 'enforc':22,84 'ensur':135 'exampl':350 'exist':66,152,195,205,273,322 'fail':176,263 'failsaf':24,88 'fix':183 'flatten':98 'flow':302 'follow':341 'follow-up':340 'format':33 'git':102 'guidanc':349 'har':127 'html':89 'id':104 'identifi':277 'imag':38 'improv':241 'includ':19 'inform':42 'interact':71 'issu':184 'jacoco':25,109 'java':3,125 'java-maven-plugin':2 'jib':40,106 'jmh':124 'jxr':94 'manag':36 'mandatori':161 'maven':4,14,44,51,79,81,83,85,87,95,97,99,101,105,107,237,242 'microbenchmark':126 'mutat':113 'mvn':166,257 'need':9,306 'never':201 'new':209 'non':311 'non-conflict':310 'one':210,323 'owasp':31,116 'pitest':26,112 'plugin':5,15,45,52,80,133,171,206,222,238,243,251,267,289,313,317,332 'plugins/profiles':307,336 'pmd':28,122 'pom.xml':18,46,56,240,245 'practic':49 'preserv':65,151,324 'proceed':187 'process':63,149 'profil':54,108,269,319 'project':137,249,325 'qualiti':20 'question':61,147,300 'question-driven':60,146,299 'rational':337 'read':217,288,294 'recommend':134,172,339 'refer':219,290,346 'references/112-java-maven-plugins.md':295,354,355 'remov':202,321 'replac':204,286 'report':91,93,334 'resolv':189 'run':162,253 'safeti':173 'scan':30 'scope':190 'secur':29,115 'see':353 'select':160,293,304,316 'setup':333 'skill':72,78,235 'skill-112-java-maven-plugins' 'sonarqube/sonarcloud':123 'source-jabrena' 'spotbug':27,121 'spotless':34,96 'start':271 'state':142 'static':119 'step':193,230 'stop':177,260 'structur':59,145,326 'summar':330 'surefir':23,86,92 'templat':225 'test':90,114 'tool':21 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'use':6,57,143,233,297 'user':159,181 'valid':141,164,167,175,248,255,258,262 'version':35,100 'without':320 'workflow':246 'xml':224","prices":[{"id":"6f784400-ec8b-43fe-ab63-65128bf0f8b3","listingId":"10d71a6c-ab80-4490-a7e5-9a65b7712982","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-18T22:01:51.589Z"}],"sources":[{"listingId":"10d71a6c-ab80-4490-a7e5-9a65b7712982","source":"github","sourceId":"jabrena/cursor-rules-java/112-java-maven-plugins","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/112-java-maven-plugins","isPrimary":false,"firstSeenAt":"2026-04-18T22:01:51.589Z","lastSeenAt":"2026-04-26T18:53:40.497Z"}],"details":{"listingId":"10d71a6c-ab80-4490-a7e5-9a65b7712982","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"112-java-maven-plugins","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T13:48:39Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"6ef25dced82a995f5f1fa6b6a2069dc000df873f","skill_md_path":"skills/112-java-maven-plugins/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/112-java-maven-plugins"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"112-java-maven-plugins","license":"Apache-2.0","description":"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. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/112-java-maven-plugins"},"updatedAt":"2026-04-26T18:53:40.497Z"}}