{"id":"86c91f50-0cb5-4453-b660-a981a75e21bd","shortId":"SgfFJz","kind":"skill","title":"110-java-maven-best-practices","tagline":"Use when you need to review, improve, or troubleshoot a Maven pom.xml file — including dependency management with BOMs, plugin configuration, version centralization, multi-module project structure, build profiles, or any situation where you want to align your Maven setup with ind","description":"# Maven Best Practices\n\nImprove Maven POM configuration using industry-standard best practices.\n\n**What is covered in this Skill?**\n\n- Dependency management via `<dependencyManagement>` and BOMs\n- Standard directory layout (`src/main/java`, `src/test/java`)\n- Centralized plugin management\n- Build profiles for environment-specific settings\n- Readable POM structure with version properties\n- Explicit repository declaration\n- Version centralization\n- Multi-module project structure with proper inheritance\n- Cross-module version consistency\n- Multi-module scope: After reading the root `pom.xml`, check for a `<modules>` section. If present, read **every** child module's `pom.xml` before making any recommendations.\n- Check each child for hardcoded versions that duplicate parent `<dependencyManagement>`, redundant `<pluginManagement>` blocks, properties that should be centralized, and version drift across sibling modules.\n\n## Constraints\n\nBefore applying Maven best practices recommendations, ensure the project is in a valid state by running Maven validation. This helps identify any existing configuration issues that need to be resolved first. For multi-module projects, scope analysis must cover every child module POM — not just the root.\n\n- **MANDATORY**: Run `./mvnw validate` or `mvn validate` before applying any Maven best practices recommendations\n- **VERIFY**: Ensure all validation errors are resolved before proceeding with POM modifications\n- **SAFETY**: If validation fails, do not continue and ask the user to fix the issues before continuing\n- **MULTI-MODULE DISCOVERY**: After reading the root `pom.xml`, check whether it contains a `<modules>` section. If it does, read every child module's `pom.xml` before making any recommendations — analysis scope is the full module tree, not only the root\n- **CROSS-MODULE SCOPE**: When child modules exist, check each one for: hardcoded dependency versions that duplicate `<dependencyManagement>` in the parent, plugin configurations that duplicate `<pluginManagement>`, properties that should be centralized in the parent, and version drift (same artifact declared at different versions across sibling modules)\n- **BEFORE APPLYING**: Read the reference for detailed examples, good/bad patterns, and constraints\n\n## When to use this skill\n\n- Review pom.xml to improve it\n- Apply Maven best practices to pom.xml\n- Improve Maven POM configuration\n\n## Workflow\n\n1. **Validate project before recommendations**\n\nRun `./mvnw validate` or `mvn validate` and stop if validation fails.\n\n2. **Read reference and analyze root POM**\n\nRead `references/110-java-maven-best-practices.md`, then inspect root `pom.xml` structure, dependency management, plugin management, properties, and profiles.\n\n3. **Expand to full module tree when present**\n\nIf root has a `<modules>` section, read every child `pom.xml` and evaluate cross-module duplication, centralization opportunities, and version drift.\n\n4. **Provide prioritized best-practice recommendations**\n\nPropose concrete, safe improvements aligned with Maven best practices and full-module findings.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/110-java-maven-best-practices.md](references/110-java-maven-best-practices.md).","tags":["110","java","maven","best","practices","cursor","rules","jabrena","agent-skills","ai-skills","claude","claude-code"],"capabilities":["skill","source-jabrena","skill-110-java-maven-best-practices","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/110-java-maven-best-practices","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 (3,260 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.363Z","embedding":null,"createdAt":"2026-04-18T22:01:50.062Z","updatedAt":"2026-04-26T18:53:40.363Z","lastSeenAt":"2026-04-26T18:53:40.363Z","tsv":"'/mvnw':210,373 '1':367 '110':1 '2':383 '3':404 '4':432 'across':156,331 'align':43,443 'analysi':197,279 'analyz':387 'appli':161,216,335,356 'artifact':326 'ask':242 'best':5,50,60,163,219,358,436,446 'best-practic':435 'block':147 'bom':24,72 'build':34,81 'central':28,78,98,152,318,427 'check':121,137,260,298 'child':129,139,201,271,295,419 'concret':440 'configur':26,55,183,311,365 'consist':111 'constraint':159,345,459 'contain':263 'continu':240,250 'cover':64,199 'cross':108,291,424 'cross-modul':107,290,423 'declar':96,327 'depend':21,68,303,397 'detail':340,455 'differ':329 'directori':74 'discoveri':254 'drift':155,324,431 'duplic':144,306,313,426 'ensur':166,223 'environ':85 'environment-specif':84 'error':226 'evalu':422 'everi':128,200,270,418 'exampl':341,457 'exist':182,297 'expand':405 'explicit':94 'fail':237,382 'file':19 'find':452 'first':190 'fix':246 'full':283,407,450 'full-modul':449 'good/bad':342 'guidanc':456 'hardcod':141,302 'help':179 'identifi':180 'improv':13,52,354,362,442 'includ':20 'ind':48 'industri':58 'industry-standard':57 'inherit':106 'inspect':393 'issu':184,248 'java':3 'java-maven-best-practic':2 'layout':75 'make':134,276 'manag':22,69,80,398,400 'mandatori':208 'maven':4,17,45,49,53,162,176,218,357,363,445 'modif':233 'modul':31,101,109,114,130,158,194,202,253,272,284,292,296,333,408,425,451 'multi':30,100,113,193,252 'multi-modul':29,99,112,192,251 'must':198 'mvn':213,376 'need':10,186 'one':300 'opportun':428 'parent':145,309,321 'pattern':343 'plugin':25,79,310,399 'pom':54,89,203,232,364,389 'pom.xml':18,120,132,259,274,352,361,395,420 'practic':6,51,61,164,220,359,437,447 'present':126,411 'priorit':434 'proceed':230 'profil':35,82,403 'project':32,102,168,195,369 'proper':105 'properti':93,148,314,401 'propos':439 'provid':433 'read':117,127,256,269,336,384,390,417 'readabl':88 'recommend':136,165,221,278,371,438 'redund':146 'refer':338,385,453 'references/110-java-maven-best-practices.md':391,461,462 'repositori':95 'resolv':189,228 'review':12,351 'root':119,207,258,289,388,394,413 'run':175,209,372 'safe':441 'safeti':234 'scope':115,196,280,293 'section':124,265,416 'see':460 'set':87 'setup':46 'sibl':157,332 'situat':38 'skill':67,350 'skill-110-java-maven-best-practices' 'source-jabrena' 'specif':86 'src/main/java':76 'src/test/java':77 'standard':59,73 'state':173 'stop':379 'structur':33,90,103,396 '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' 'tree':285,409 'troubleshoot':15 'use':7,56,348 'user':244 'valid':172,177,211,214,225,236,368,374,377,381 'verifi':222 'version':27,92,97,110,142,154,304,323,330,430 'via':70 'want':41 'whether':261 'workflow':366","prices":[{"id":"635ce9f6-9a7f-40e9-9bd3-6b8870d94e6b","listingId":"86c91f50-0cb5-4453-b660-a981a75e21bd","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:50.062Z"}],"sources":[{"listingId":"86c91f50-0cb5-4453-b660-a981a75e21bd","source":"github","sourceId":"jabrena/cursor-rules-java/110-java-maven-best-practices","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/110-java-maven-best-practices","isPrimary":false,"firstSeenAt":"2026-04-18T22:01:50.062Z","lastSeenAt":"2026-04-26T18:53:40.363Z"}],"details":{"listingId":"86c91f50-0cb5-4453-b660-a981a75e21bd","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"110-java-maven-best-practices","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":"b193f4698538c9e9049c5aa3b5492015c91fa5d5","skill_md_path":"skills/110-java-maven-best-practices/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/110-java-maven-best-practices"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"110-java-maven-best-practices","license":"Apache-2.0","description":"Use when you need to review, improve, or troubleshoot a Maven pom.xml file — including dependency management with BOMs, plugin configuration, version centralization, multi-module project structure, build profiles, or any situation where you want to align your Maven setup with industry best practices. This should trigger for requests such as Review pom.xml to improve it; Apply Maven best practices to pom.xml; Improve Maven POM configuration. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/110-java-maven-best-practices"},"updatedAt":"2026-04-26T18:53:40.363Z"}}