java-maven

Configure Maven POM files, dependencies, plugins, and multi-module Java builds.

Updated Dec 26, 2025
One-click install
npx skills add https://github.com/jwvdvuurst/CalculatorCollection --skill java-maven-jwvdvuurst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-maven
Source: https://github.com/jwvdvuurst/CalculatorCollection/tree/main/skills/java-maven
Command: npx skills add https://github.com/jwvdvuurst/CalculatorCollection --skill java-maven-jwvdvuurst

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Java developers often struggle with Maven build configuration: managing dependency versions, resolving conflicts, structuring multi-module projects, and troubleshooting build failures. This Skill provides the patterns and commands to handle these tasks correctly. ## Core Features & Use Cases - POM Configuration: Set up project coordinates, Java version properties, and build plugins such as maven-enforcer-plugin. - Dependency Management: Import BOMs like spring-boot-dependencies to align versions and avoid conflicts across modules. - Build Diagnostics: Use commands like mvn dependency:tree, dependency:analyze, and help:effective-pom to inspect and fix build issues. - Use Case: When a Spring Boot project fails with a version conflict, use this Skill to import the Spring Boot BOM, run the enforcer plugin, and verify the resolved dependency tree. ## Quick Start Ask the assistant to configure a Maven POM for a Java 21 Spring Boot project with dependency management and the enforcer plugin.

Frequently Asked Questions about java-maven

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage dependency versions in Maven with a BOM?

Import a BOM in the dependencyManagement section with type pom and scope import, such as spring-boot-dependencies. This aligns all covered dependency versions so you omit explicit version tags and avoid conflicts.

How to find unused or conflicting dependencies in a Maven project?

Run mvn dependency:tree to view the resolved dependency graph and mvn dependency:analyze to detect unused declared or undeclared used dependencies. Use mvn versions:display-dependency-updates to check for newer versions.

What is the Maven build lifecycle order?

The default lifecycle runs validate, compile, test, package, verify, install, then deploy. Each phase executes all prior phases, so running mvn package also compiles and tests the project.

Why does my Maven build fail with a version conflict?

Conflicts occur when transitive dependencies require different versions of the same artifact. Resolve them by importing a BOM, declaring the version explicitly in dependencyManagement, or enforcing rules with maven-enforcer-plugin.

How do I fix Maven build out-of-memory errors?

Set the MAVEN_OPTS environment variable with a larger heap, for example MAVEN_OPTS=-Xmx1g, before running the build. This increases memory available to the Maven JVM process during compilation and packaging.