maven-dependency-management
Use when managing Maven dependencies, resolving dependency conflicts, configuring BOMs, or optimizing dependency trees in Java projects.
Install / Use
npx skills add benchflow-ai/skillsbench --skill maven-dependency-managementInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of maven-dependency-management
maven-dependency-management scores 89/100 on our quality scale, 1505th of 4,698 Development & Engineering skills we index (top 33%).
Its SKILL.md is 12 KB long, well organised into 54 sections with 24 code examples: a thorough specification that gives an agent plenty to work with.
With 1,813 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-10-31 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 98/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-02. Automated pattern scan on 2026-10-02. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
maven-dependency-management compared with similar skills
All 4 of these similar skills score higher than maven-dependency-management; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| maven-dependency-management (this skill)by benchflow-ai | 89 | 1.8k | 4mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install maven-dependency-management?
- Run
npx skills add benchflow-ai/skillsbench --skill maven-dependency-management. The install tabs above show the steps for each supported agent. - Which AI agents does maven-dependency-management work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is maven-dependency-management safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 98/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is maven-dependency-management still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: maven-dependency-management description: Use when managing Maven dependencies, resolving dependency conflicts, configuring BOMs, or optimizing dependency trees in Java projects.
Maven Dependency Management
Master Maven dependency management including dependency declaration, scope management, version resolution, BOMs, and dependency tree optimization.
Overview
Maven's dependency management is a cornerstone of Java project build systems. It handles transitive dependencies, version conflicts, and provides mechanisms for controlling dependency resolution across multi-module projects.
Dependency Declaration
Basic Dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>3.2.0</version>
</dependency>
Dependency with Scope
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
Optional Dependencies
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<optional>true</optional>
</dependency>
Dependency Scopes
Available Scopes
| Scope | Compile CP | Test CP | Runtime CP | Transitive | |-------|-----------|---------|------------|------------| | compile | Yes | Yes | Yes | Yes | | provided | Yes | Yes | No | No | | runtime | No | Yes | Yes | Yes | | test | No | Yes | No | No | | system | Yes | Yes | No | No | | import | N/A | N/A | N/A | N/A |
Scope Examples
<!-- Compile scope (default) - available everywhere -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
</dependency>
<!-- Provided - available at compile, not packaged -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<!-- Runtime - only needed at runtime -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.1</version>
<scope>runtime</scope>
</dependency>
<!-- Test - only for testing -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
Version Management
Property-Based Versions
<properties>
<spring-boot.version>3.2.0</spring-boot.version>
<junit.version>5.10.1</junit.version>
<jackson.version>2.16.0</jackson.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot.version}</version>
</dependency>
</dependencies>
Version Ranges
<!-- Exact version -->
<version>1.0.0</version>
<!-- Greater than or equal -->
<version>[1.0.0,)</version>
<!-- Less than -->
<version>(,1.0.0)</version>
<!-- Range inclusive -->
<version>[1.0.0,2.0.0]</version>
<!-- Range exclusive -->
<version>(1.0.0,2.0.0)</version>
Latest Version (Not Recommended)
<!-- Avoid in production -->
<version>LATEST</version>
<version>RELEASE</version>
Dependency Management Section
Centralizing Versions
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>2.16.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- No version needed when declared in dependencyManagement -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
BOM (Bill of Materials) Import
<dependencyManagement>
<dependencies>
<!-- Spring Boot BOM -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- AWS SDK BOM -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.23.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- JUnit BOM -->
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.10.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Exclusions
Excluding Transitive Dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Add alternative -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
Excluding Logging Frameworks
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
Dependency Analysis
View Dependency Tree
# Full dependency tree
mvn dependency:tree
# Filter by artifact
mvn dependency:tree -Dincludes=org.slf4j
# Output to file
mvn dependency:tree -DoutputFile=deps.txt
# Verbose output showing conflict resolution
mvn dependency:tree -Dverbose
Analyze Dependencies
# Find unused declared and used undeclared dependencies
mvn dependency:analyze
# Show only problems
mvn dependency:analyze-only
# Include test scope
mvn dependency:analyze -DignoreNonCompile=false
List Dependencies
# List all dependencies
mvn dependency:list
# List with scope
mvn dependency:list -DincludeScope=runtime
Conflict Resolution
Maven's Default Strategy
Maven uses "nearest definition wins" for version conflicts:
A -> B -> C 1.0
A -> C 2.0
Result: C 2.0 is used (nearest to root)
Forcing Versions
<dependencyManagement>
<dependencies>
<!-- Force specific version across all modules -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
</dependency>
</dependencies>
</dependencyManagement>
Enforcer Plugin for Version Control
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<dependencyConvergence/>
<requireUpperBoundDeps/>
<banDuplicatePomDependencyVersions/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Multi-Module Projects
Parent POM Dependency Management
<!-- parent/pom.xml -->
<project>
<groupId>com.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
<!-- module/pom.xml -->
<project>
<parent>
<groupId>com.example</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>module</artifactId>
<dependencies>
<!-- Version inherited from parent -->
<dependency>
<groupId>com.example</groupId>
<artifactId>common</artifactId>
</dependency>
</dependencies>
</project>
Repository Configuration
Central Repository
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
Private Repository
<repositories>
<repository>
<id>company-repo</id>
<url>https://nexus.company.com/repository/maven-public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
Repository in Settings.xml
<!-- ~/.m2/settings.xml -->
<settings>
<servers>
<server>
<id>company-repo</id>
<username>${env.REPO_USER}</username>
<password>${env.REPO_PASS}</password>
</server>
</servers>
</settings>
Best Practices
- Use dependencyManagement - Centralize versions in parent POMs
- Import BOMs - Use well-maintained BOMs for framework dependencies
- Avoid Version Ranges - Pin exact versions for reproducibility
- Regular Updates - Keep dependencies current for security
- Minimize Scopes - Use appropriate scopes to reduce package size
- Exclude Unused - Remove unused transitive dependencies
- Document Exclusions - Comment why exclusions are needed
- Run dependency:analyze - Regularly check for issues
- Use Enforcer Plugin - Ensure dependency convergence
- Lock Versions - Use versions-maven-plugin for updates
Common Pitfalls
- Version Conflicts - Transitive dependency version mismatches
- Missing Exclusions - Duplicate classes from different artifacts
- Wrong Scope - Compile vs runtime vs provided confusion
- Outdated Dependencies - Security vulnerabilities in old versions
- Circular Dependencies - Module A depends on B depends on A
- Snapshot in Production - Using SNAPSHOT versions in releases
- System Scope - Hardcoded paths break portability
- Optional Misuse - Marking required dependencies as optional
Troubleshooting
Debug Dependency Resolution
# Enable debug output
mvn dependency:tree -X
# Show conflict resolution
mvn dependency:tree -Dverbose=true
Force Re-download
# Clear local repository cache
mvn dependency:purge-local-repository
# Force update
mvn -U clean install
Check Effective POM
# See resolved dependency versions
mvn help:effective-pom
When to Use This Skill
- Adding new de
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
