# java-maven

Configures Maven POM files and manages dependencies using BOMs directly through your AI agent.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 894 installs · ★ 41
- Author: pluginagentmarketplace
- License: LicenseRef-Proprietary · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pluginagentmarketplace/custom-plugin-java/tree/HEAD/skills/java-maven/SKILL.md
- Updated: 2026-01-05
- HTML: https://affpapa.org/en/nevibecode/skills/java-maven

## What it does

This skill guides coding agents through building Java projects with Apache Maven. It supports three layout types: single modules, multi-module setups, and libraries. The agent learns how to navigate phases from `validate` to `deploy`, hook build plugins, and structure dependencies.

The skill provides practical recipes for inspecting packages and fixing build issues. When library versions collide, it applies BOM imports or `maven-enforcer-plugin`. If a build process runs out of memory, it directs the environment to set `MAVEN_OPTS=-Xmx1g`. The agent relies on `Read`, `Write`, `Bash`, `Glob`, and `Grep` access to execute build commands.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-maven -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/java-maven/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/java-maven/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-maven -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/java-maven/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-maven -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/java-maven/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install pluginagentmarketplace/custom-plugin-java java-maven
```

2. **Manually: put the files in place**
- File: `.github/skills/java-maven/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-maven -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/pluginagentmarketplace/custom-plugin-java --path skills/java-maven
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/java-maven/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-maven -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/pluginagentmarketplace/custom-plugin-java/tree/HEAD/skills/java-maven/SKILL.md

## When to use it
- Configure `pom.xml` files for single-module or multi-module Java projects
- Pin third-party library versions using dependency BOM imports
- Detect undeclared or unused packages via `mvn dependency:analyze`
- Fix build memory exhaustion by configuring `MAVEN_OPTS`

## Example prompts
- Inspect the dependency tree in this repo and check for version conflicts
- Set up a `pom.xml` file targeting Java 21 with Spring Boot BOM dependencies
- Run a batch build verification using `mvn -B verify`

## Similar
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [claude-api](https://affpapa.org/en/nevibecode/skills/claude-api.md) — skill · 74198 installs
- [lark-im](https://affpapa.org/en/nevibecode/skills/lark-im.md) — skill · 472900 installs
- [lark-event](https://affpapa.org/en/nevibecode/skills/lark-event.md) — skill · 466800 installs
- [caveman-discover](https://affpapa.org/en/nevibecode/skills/caveman-discover.md) — skill · 104400 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs

From the same set: [pluginagentmarketplace/custom-plugin-java](https://affpapa.org/en/nevibecode/by/pluginagentmarketplace/custom-plugin-java.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
