4,653,104 AI resources indexedWorking toward the world’s largest AI resource index.

Maven Build Standards

POM structure, dependency management, plugins, profiles, and multi-module projects.

Installable skillMITBy ngxtmUpdated Oct 30, 2026
INTENDED FOROpenClawInstall in a listed agent.

instructions.md

---
name: maven-build-1e17b6307bfe
description: POM structure, dependency management, plugins, profiles, and multi-module projects.
metadata:
  labels: [java, maven, build]
  triggers:
    files: ['pom.xml']
    keywords: [dependencyManagement, plugin, maven, lifecycle, groupId, artifactId, version]
---

# Maven Build Standards

## POM Structure

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                             http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.2.0</version>
    </parent>

    <groupId>com.example</groupId>
    <artifactId>my-app</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <java.version>21</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
```

## Dependency Management

```xml
<dependencyManagement>
    <dependencies>
        <!-- BOM import -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>2023.0.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
```

## Common Commands

```bash
mvn clean install              # Build and install
mvn clean install -DskipTests  # Skip tests
mvn dependency:tree            # Show dependency tree
mvn versions:display-dependency-updates  # Check updates
mvn spring-boot:run            # Run Spring Boot app
```

## References

- [Dependency Management](references/dependency-management.md) - BOMs, exclusions, versions

Platform guidance

Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.