110-java-maven-best-practices
Skill2 starsChanged 9 months agoApache-2.0View on GitHub
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. Part of the skills-for-java project
2 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- jabrena/cursor-rules-javaedited, first seen Oct 17, 2026
- jabrena/plinthedited, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- jabrena/plinth★ 46948% same
- jabrena/cursor-rules-java★ 46148% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- 014-agile-create-user-storySkill
- 020-planning-enhance-ai-plan-modeSkill
- 030-architecture-adr-generalSkill
- 031-architecture-adr-functional-requirementsSkill
- 032-architecture-adr-non-functional-requirementsSkill
- 033-architecture-diagramsSkill
- 111-java-maven-dependenciesSkill
- 112-java-maven-pluginsSkill
- 113-java-maven-documentationSkill
- 121-java-object-oriented-designSkill
- 122-java-type-designSkill
- 123-java-exception-handlingSkill
- 124-java-secure-codingSkill
- 125-java-concurrencySkill
- 128-java-genericsSkill
- 130-java-testing-strategiesSkill
- 131-java-testing-unit-testingSkill
- 132-java-testing-integration-testingSkill
- 133-java-testing-acceptance-testsSkill
- 141-java-refactoring-with-modern-featuresSkill
- 142-java-functional-programmingSkill
- 143-java-functional-exception-handlingSkill
- 144-java-data-oriented-programmingSkill
- 151-java-performance-jmeterSkill
- 161-java-profiling-detectSkill
- 162-java-profiling-analyzeSkill
- 163-java-profiling-refactorSkill
- 164-java-profiling-verifySkill
- 170-java-documentationSkill
- 180-java-observability-loggingSkill
- 200-agents-mdSkill
- 301-frameworks-spring-boot-coreSkill
- 302-frameworks-spring-boot-restSkill
- 312-frameworks-spring-data-jdbcSkill
- 321-frameworks-spring-boot-testing-unit-testsSkill
- 322-frameworks-spring-boot-testing-integration-testsSkill
- 323-frameworks-spring-boot-testing-acceptance-testsSkill
- 324-frameworks-spring-boot-testing-e2e-local-testsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Check each child for hardcoded versions that duplicate parent <dependencyManagement>, redundant <pluginManagement> blocks, properties that …
- Very specific: line 31
MANDATORY: Run ./mvnw validate or mvn validate before applying any Maven best practices recommendations
- Distinctive: line 32
VERIFY: Ensure all validation errors are resolved before proceeding with POM modifications
- Distinctive: line 33
SAFETY: If validation fails, do not continue and ask the user to fix the issues before continuing
- Very specific: line 34
MULTI-MODULE DISCOVERY: After reading the root pom.xml, check whether it contains a <modules> section.
- Very specific: line 35
CROSS-MODULE SCOPE: When child modules exist, check each one for: hardcoded dependency versions that duplicate <dependencyManagement> in …
- Distinctive: line 36
BEFORE APPLYING: Read the reference for detailed examples, good/bad patterns, and constraints
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Maven Best Practices
Improve Maven POM configuration using industry-standard best practices.
What is covered in this Skill?
- Dependency management via
<dependencyManagement>and BOMs - Standard directory layout (
src/main/java,src/test/java) - Centralized plugin management
- Build profiles for environment-specific settings
- Readable POM structure with version properties
- Explicit repository declaration
- Version centralization
- Multi-module project structure with proper inheritance
- Cross-module version consistency
- Multi-module scope: After reading the root
pom.xml, check for a<modules>section. If present, read every child module'spom.xmlbefore making any recommendations. - Check each child for hardcoded versions that duplicate parent
<dependencyManagement>, redundant<pluginManagement>blocks, properties that should be centralized, and version drift across sibling modules.
Constraints
Before 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.
- MANDATORY: Run
./mvnw validateormvn validatebefore applying any Maven best practices recommendations - VERIFY: Ensure all validation errors are resolved before proceeding with POM modifications
- SAFETY: If validation fails, do not continue and ask the user to fix the issues before continuing
- MULTI-MODULE DISCOVERY: After reading the root
pom.xml, check whether it contains a<modules>section. If it does, read every child module'spom.xmlbefore making any recommendations — analysis scope is the full module tree, not only the root - 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) - BEFORE APPLYING: Read the reference for detailed examples, good/bad patterns, and constraints
When to use this skill
- Review pom.xml to improve it
- Apply Maven best practices to pom.xml
- Improve Maven POM configuration
Reference
For detailed guidance, examples, and constraints, see references/110-java-maven-best-practices.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

