# Maven Build

> Maven Build is an Agent Skill for development published in the MorphiaOrg/morphia repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Build and test the Morphia project using Maven. Use when compiling, running tests, or building artifacts.

- Skill name: `maven-build`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/MorphiaOrg/morphia/blob/HEAD/.claude/skills/maven-build/SKILL.md
- Repository: MorphiaOrg/morphia (1,677 GitHub stars when collected)

## SKILL.md

# Maven Build Commands

This is a multi-module Maven project. Use `mvn` or `./mvnw` (if available) to build and test.

## Common Commands

- **Compile**: `mvn clean compile`
- **Run tests**: `mvn test`
- **Run specific test**: `mvn test -Dtest=ClassName#methodName`
- **Integration tests**: `mvn clean verify`
- **Full build (skip tests)**: `mvn clean install -DskipTests`
- **Full build**: `mvn clean install`

## Module-Specific Builds

To build or test a specific module:
```
mvn -pl module-name test
mvn -pl module-name -am clean install
```

The `-am` flag builds required dependencies.

## Guidelines

- Prefer `./mvnw` if the wrapper exists in the project root
- Always run tests after making code changes to verify nothing broke
- If tests fail, analyze the error output and suggest fixes
- Use `-DskipTests` only when explicitly requested or for quick compile checks

---

Source: https://www.openparable.com/skill/development/maven-build (OpenParable). Cite the canonical URL above.
