/install fix-build-google-auto-maven-plugin-configuration
Maven Plugin Configuration
Master Maven plugin configuration including core plugins, build plugins, reporting plugins, and custom plugin development.
Overview
Maven plugins provide the actual functionality for building projects. Understanding how to configure plugins effectively is essential for customizing builds, optimizing performance, and ensuring code quality.
Plugin Basics
Plugin Structure
\x3Cbuild>
\x3Cplugins>
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-compiler-plugin\x3C/artifactId>
\x3Cversion>3.12.1\x3C/version>
\x3Cconfiguration>
\x3C!-- Plugin-specific configuration -->
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>compile-java\x3C/id>
\x3Cphase>compile\x3C/phase>
\x3Cgoals>
\x3Cgoal>compile\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
\x3C/plugins>
\x3C/build>
Plugin Management
\x3Cbuild>
\x3CpluginManagement>
\x3Cplugins>
\x3C!-- Define versions and shared config -->
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-compiler-plugin\x3C/artifactId>
\x3Cversion>3.12.1\x3C/version>
\x3Cconfiguration>
\x3Crelease>17\x3C/release>
\x3C/configuration>
\x3C/plugin>
\x3C/plugins>
\x3C/pluginManagement>
\x3Cplugins>
\x3C!-- Actually use plugin (inherits config) -->
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-compiler-plugin\x3C/artifactId>
\x3C/plugin>
\x3C/plugins>
\x3C/build>
Core Build Plugins
Compiler Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-compiler-plugin\x3C/artifactId>
\x3Cversion>3.12.1\x3C/version>
\x3Cconfiguration>
\x3Crelease>17\x3C/release>
\x3Cencoding>UTF-8\x3C/encoding>
\x3CshowWarnings>true\x3C/showWarnings>
\x3CshowDeprecation>true\x3C/showDeprecation>
\x3CcompilerArgs>
\x3Carg>-Xlint:all\x3C/arg>
\x3Carg>-parameters\x3C/arg>
\x3C/compilerArgs>
\x3CannotationProcessorPaths>
\x3Cpath>
\x3CgroupId>org.projectlombok\x3C/groupId>
\x3CartifactId>lombok\x3C/artifactId>
\x3Cversion>1.18.30\x3C/version>
\x3C/path>
\x3C/annotationProcessorPaths>
\x3C/configuration>
\x3C/plugin>
Resources Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-resources-plugin\x3C/artifactId>
\x3Cversion>3.3.1\x3C/version>
\x3Cconfiguration>
\x3Cencoding>UTF-8\x3C/encoding>
\x3CpropertiesEncoding>UTF-8\x3C/propertiesEncoding>
\x3CnonFilteredFileExtensions>
\x3CnonFilteredFileExtension>pdf\x3C/nonFilteredFileExtension>
\x3CnonFilteredFileExtension>ico\x3C/nonFilteredFileExtension>
\x3CnonFilteredFileExtension>png\x3C/nonFilteredFileExtension>
\x3CnonFilteredFileExtension>jpg\x3C/nonFilteredFileExtension>
\x3C/nonFilteredFileExtensions>
\x3C/configuration>
\x3C/plugin>
JAR Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-jar-plugin\x3C/artifactId>
\x3Cversion>3.3.0\x3C/version>
\x3Cconfiguration>
\x3Carchive>
\x3Cmanifest>
\x3CaddClasspath>true\x3C/addClasspath>
\x3CmainClass>com.example.Main\x3C/mainClass>
\x3CaddDefaultImplementationEntries>true\x3C/addDefaultImplementationEntries>
\x3CaddDefaultSpecificationEntries>true\x3C/addDefaultSpecificationEntries>
\x3C/manifest>
\x3CmanifestEntries>
\x3CBuild-Time>${maven.build.timestamp}\x3C/Build-Time>
\x3CBuilt-By>${user.name}\x3C/Built-By>
\x3C/manifestEntries>
\x3C/archive>
\x3Cexcludes>
\x3Cexclude>**/logback-test.xml\x3C/exclude>
\x3C/excludes>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>test-jar\x3C/id>
\x3Cgoals>
\x3Cgoal>test-jar\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Source Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-source-plugin\x3C/artifactId>
\x3Cversion>3.3.0\x3C/version>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>attach-sources\x3C/id>
\x3Cgoals>
\x3Cgoal>jar-no-fork\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Javadoc Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-javadoc-plugin\x3C/artifactId>
\x3Cversion>3.6.3\x3C/version>
\x3Cconfiguration>
\x3Cdoclint>none\x3C/doclint>
\x3Csource>17\x3C/source>
\x3Cquiet>true\x3C/quiet>
\x3Clinks>
\x3Clink>https://docs.oracle.com/en/java/javase/17/docs/api/\x3C/link>
\x3C/links>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>attach-javadocs\x3C/id>
\x3Cgoals>
\x3Cgoal>jar\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Testing Plugins
Surefire Plugin (Unit Tests)
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-surefire-plugin\x3C/artifactId>
\x3Cversion>3.2.3\x3C/version>
\x3Cconfiguration>
\x3Cincludes>
\x3Cinclude>**/*Test.java\x3C/include>
\x3Cinclude>**/*Tests.java\x3C/include>
\x3Cinclude>**/Test*.java\x3C/include>
\x3C/includes>
\x3Cexcludes>
\x3Cexclude>**/*IT.java\x3C/exclude>
\x3Cexclude>**/*IntegrationTest.java\x3C/exclude>
\x3C/excludes>
\x3CargLine>-Xmx1024m -XX:+UseG1GC\x3C/argLine>
\x3Cparallel>methods\x3C/parallel>
\x3CthreadCount>4\x3C/threadCount>
\x3CforkCount>1C\x3C/forkCount>
\x3CreuseForks>true\x3C/reuseForks>
\x3CsystemPropertyVariables>
\x3Cspring.profiles.active>test\x3C/spring.profiles.active>
\x3C/systemPropertyVariables>
\x3CenvironmentVariables>
\x3CTEST_ENV>true\x3C/TEST_ENV>
\x3C/environmentVariables>
\x3C/configuration>
\x3C/plugin>
Failsafe Plugin (Integration Tests)
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-failsafe-plugin\x3C/artifactId>
\x3Cversion>3.2.3\x3C/version>
\x3Cconfiguration>
\x3Cincludes>
\x3Cinclude>**/*IT.java\x3C/include>
\x3Cinclude>**/*IntegrationTest.java\x3C/include>
\x3C/includes>
\x3CskipAfterFailureCount>3\x3C/skipAfterFailureCount>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cgoals>
\x3Cgoal>integration-test\x3C/goal>
\x3Cgoal>verify\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
JaCoCo Plugin (Code Coverage)
\x3Cplugin>
\x3CgroupId>org.jacoco\x3C/groupId>
\x3CartifactId>jacoco-maven-plugin\x3C/artifactId>
\x3Cversion>0.8.11\x3C/version>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>prepare-agent\x3C/id>
\x3Cgoals>
\x3Cgoal>prepare-agent\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3Cexecution>
\x3Cid>report\x3C/id>
\x3Cphase>test\x3C/phase>
\x3Cgoals>
\x3Cgoal>report\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3Cexecution>
\x3Cid>check\x3C/id>
\x3Cgoals>
\x3Cgoal>check\x3C/goal>
\x3C/goals>
\x3Cconfiguration>
\x3Crules>
\x3Crule>
\x3Celement>BUNDLE\x3C/element>
\x3Climits>
\x3Climit>
\x3Ccounter>LINE\x3C/counter>
\x3Cvalue>COVEREDRATIO\x3C/value>
\x3Cminimum>0.80\x3C/minimum>
\x3C/limit>
\x3Climit>
\x3Ccounter>BRANCH\x3C/counter>
\x3Cvalue>COVEREDRATIO\x3C/value>
\x3Cminimum>0.70\x3C/minimum>
\x3C/limit>
\x3C/limits>
\x3C/rule>
\x3C/rules>
\x3C/configuration>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Quality Plugins
Enforcer Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-enforcer-plugin\x3C/artifactId>
\x3Cversion>3.4.1\x3C/version>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>enforce\x3C/id>
\x3Cgoals>
\x3Cgoal>enforce\x3C/goal>
\x3C/goals>
\x3Cconfiguration>
\x3Crules>
\x3CrequireMavenVersion>
\x3Cversion>[3.8.0,)\x3C/version>
\x3C/requireMavenVersion>
\x3CrequireJavaVersion>
\x3Cversion>[17,)\x3C/version>
\x3C/requireJavaVersion>
\x3CdependencyConvergence/>
\x3CrequireUpperBoundDeps/>
\x3CbanDuplicatePomDependencyVersions/>
\x3CbannedDependencies>
\x3Cexcludes>
\x3Cexclude>commons-logging:commons-logging\x3C/exclude>
\x3Cexclude>log4j:log4j\x3C/exclude>
\x3C/excludes>
\x3C/bannedDependencies>
\x3C/rules>
\x3C/configuration>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Checkstyle Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-checkstyle-plugin\x3C/artifactId>
\x3Cversion>3.3.1\x3C/version>
\x3Cconfiguration>
\x3CconfigLocation>checkstyle.xml\x3C/configLocation>
\x3CconsoleOutput>true\x3C/consoleOutput>
\x3CfailsOnError>true\x3C/failsOnError>
\x3CviolationSeverity>warning\x3C/violationSeverity>
\x3CincludeTestSourceDirectory>true\x3C/includeTestSourceDirectory>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>checkstyle\x3C/id>
\x3Cphase>validate\x3C/phase>
\x3Cgoals>
\x3Cgoal>check\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3Cdependencies>
\x3Cdependency>
\x3CgroupId>com.puppycrawl.tools\x3C/groupId>
\x3CartifactId>checkstyle\x3C/artifactId>
\x3Cversion>10.12.6\x3C/version>
\x3C/dependency>
\x3C/dependencies>
\x3C/plugin>
SpotBugs Plugin
\x3Cplugin>
\x3CgroupId>com.github.spotbugs\x3C/groupId>
\x3CartifactId>spotbugs-maven-plugin\x3C/artifactId>
\x3Cversion>4.8.3.0\x3C/version>
\x3Cconfiguration>
\x3Ceffort>Max\x3C/effort>
\x3Cthreshold>Low\x3C/threshold>
\x3CxmlOutput>true\x3C/xmlOutput>
\x3CexcludeFilterFile>spotbugs-exclude.xml\x3C/excludeFilterFile>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cgoals>
\x3Cgoal>check\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
PMD Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-pmd-plugin\x3C/artifactId>
\x3Cversion>3.21.2\x3C/version>
\x3Cconfiguration>
\x3Crulesets>
\x3Cruleset>/category/java/bestpractices.xml\x3C/ruleset>
\x3Cruleset>/category/java/errorprone.xml\x3C/ruleset>
\x3C/rulesets>
\x3CfailOnViolation>true\x3C/failOnViolation>
\x3CprintFailingErrors>true\x3C/printFailingErrors>
\x3CincludeTests>true\x3C/includeTests>
\x3CtargetJdk>17\x3C/targetJdk>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cgoals>
\x3Cgoal>check\x3C/goal>
\x3Cgoal>cpd-check\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Packaging Plugins
Assembly Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-assembly-plugin\x3C/artifactId>
\x3Cversion>3.6.0\x3C/version>
\x3Cconfiguration>
\x3CdescriptorRefs>
\x3CdescriptorRef>jar-with-dependencies\x3C/descriptorRef>
\x3C/descriptorRefs>
\x3Carchive>
\x3Cmanifest>
\x3CmainClass>com.example.Main\x3C/mainClass>
\x3C/manifest>
\x3C/archive>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>make-assembly\x3C/id>
\x3Cphase>package\x3C/phase>
\x3Cgoals>
\x3Cgoal>single\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Shade Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-shade-plugin\x3C/artifactId>
\x3Cversion>3.5.1\x3C/version>
\x3Cexecutions>
\x3Cexecution>
\x3Cphase>package\x3C/phase>
\x3Cgoals>
\x3Cgoal>shade\x3C/goal>
\x3C/goals>
\x3Cconfiguration>
\x3Ctransformers>
\x3Ctransformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
\x3CmainClass>com.example.Main\x3C/mainClass>
\x3C/transformer>
\x3Ctransformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
\x3C/transformers>
\x3Cfilters>
\x3Cfilter>
\x3Cartifact>*:*\x3C/artifact>
\x3Cexcludes>
\x3Cexclude>META-INF/*.SF\x3C/exclude>
\x3Cexclude>META-INF/*.DSA\x3C/exclude>
\x3Cexclude>META-INF/*.RSA\x3C/exclude>
\x3C/excludes>
\x3C/filter>
\x3C/filters>
\x3Crelocations>
\x3Crelocation>
\x3Cpattern>com.google\x3C/pattern>
\x3CshadedPattern>shaded.com.google\x3C/shadedPattern>
\x3C/relocation>
\x3C/relocations>
\x3C/configuration>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
WAR Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-war-plugin\x3C/artifactId>
\x3Cversion>3.4.0\x3C/version>
\x3Cconfiguration>
\x3CfailOnMissingWebXml>false\x3C/failOnMissingWebXml>
\x3CpackagingExcludes>WEB-INF/classes/logback-test.xml\x3C/packagingExcludes>
\x3CwebResources>
\x3Cresource>
\x3Cdirectory>src/main/webapp\x3C/directory>
\x3Cfiltering>true\x3C/filtering>
\x3Cincludes>
\x3Cinclude>**/*.html\x3C/include>
\x3C/includes>
\x3C/resource>
\x3C/webResources>
\x3C/configuration>
\x3C/plugin>
Spring Boot Plugin
\x3Cplugin>
\x3CgroupId>org.springframework.boot\x3C/groupId>
\x3CartifactId>spring-boot-maven-plugin\x3C/artifactId>
\x3Cversion>3.2.0\x3C/version>
\x3Cconfiguration>
\x3CmainClass>com.example.Application\x3C/mainClass>
\x3Cexcludes>
\x3Cexclude>
\x3CgroupId>org.projectlombok\x3C/groupId>
\x3CartifactId>lombok\x3C/artifactId>
\x3C/exclude>
\x3C/excludes>
\x3Clayers>
\x3Cenabled>true\x3C/enabled>
\x3C/layers>
\x3Cimage>
\x3Cname>${project.artifactId}:${project.version}\x3C/name>
\x3Cbuilder>paketobuildpacks/builder:base\x3C/builder>
\x3C/image>
\x3C/configuration>
\x3Cexecutions>
\x3Cexecution>
\x3Cgoals>
\x3Cgoal>repackage\x3C/goal>
\x3C/goals>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Version Management Plugins
Versions Plugin
\x3Cplugin>
\x3CgroupId>org.codehaus.mojo\x3C/groupId>
\x3CartifactId>versions-maven-plugin\x3C/artifactId>
\x3Cversion>2.16.2\x3C/version>
\x3Cconfiguration>
\x3CrulesUri>file:///${project.basedir}/version-rules.xml\x3C/rulesUri>
\x3C/configuration>
\x3C/plugin>
# Check for updates
mvn versions:display-dependency-updates
mvn versions:display-plugin-updates
mvn versions:display-property-updates
# Update versions
mvn versions:update-properties
mvn versions:use-latest-releases
mvn versions:update-parent
Release Plugin
\x3Cplugin>
\x3CgroupId>org.apache.maven.plugins\x3C/groupId>
\x3CartifactId>maven-release-plugin\x3C/artifactId>
\x3Cversion>3.0.1\x3C/version>
\x3Cconfiguration>
\x3CtagNameFormat>v@{project.version}\x3C/tagNameFormat>
\x3CautoVersionSubmodules>true\x3C/autoVersionSubmodules>
\x3CreleaseProfiles>release\x3C/releaseProfiles>
\x3C/configuration>
\x3C/plugin>
Code Generation Plugins
Build Helper Plugin
\x3Cplugin>
\x3CgroupId>org.codehaus.mojo\x3C/groupId>
\x3CartifactId>build-helper-maven-plugin\x3C/artifactId>
\x3Cversion>3.5.0\x3C/version>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>add-source\x3C/id>
\x3Cphase>generate-sources\x3C/phase>
\x3Cgoals>
\x3Cgoal>add-source\x3C/goal>
\x3C/goals>
\x3Cconfiguration>
\x3Csources>
\x3Csource>${project.build.directory}/generated-sources\x3C/source>
\x3C/sources>
\x3C/configuration>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Exec Plugin
\x3Cplugin>
\x3CgroupId>org.codehaus.mojo\x3C/groupId>
\x3CartifactId>exec-maven-plugin\x3C/artifactId>
\x3Cversion>3.1.1\x3C/version>
\x3Cexecutions>
\x3Cexecution>
\x3Cid>run-script\x3C/id>
\x3Cphase>generate-sources\x3C/phase>
\x3Cgoals>
\x3Cgoal>exec\x3C/goal>
\x3C/goals>
\x3Cconfiguration>
\x3Cexecutable>bash\x3C/executable>
\x3Carguments>
\x3Cargument>${project.basedir}/scripts/generate.sh\x3C/argument>
\x3C/arguments>
\x3C/configuration>
\x3C/execution>
\x3C/executions>
\x3C/plugin>
Best Practices
- Version Pinning - Always specify plugin versions
- Plugin Management - Centralize in parent POM
- Minimal Configuration - Use defaults where possible
- Execution IDs - Use meaningful execution IDs
- Phase Binding - Bind to appropriate phases
- Skip Properties - Provide skip properties for flexibility
- Documentation - Comment complex configurations
- Inheritance - Use pluginManagement for multi-module
- Updates - Keep plugins current
- Profile Separation - Separate CI/release plugins into profiles
Common Pitfalls
- Missing Versions - Relying on default versions
- Wrong Phase - Plugin bound to wrong lifecycle phase
- Duplicate Executions - Same goal running multiple times
- Memory Issues - Insufficient heap for plugins
- Ordering - Plugin execution order conflicts
- Inheritance - Unintended plugin inheritance
- Fork Confusion - Misunderstanding fork behavior
- Skip Flags - Tests accidentally skipped in CI
When to Use This Skill
- Configuring build compilation settings
- Setting up test frameworks
- Configuring code quality checks
- Creating executable JARs
- Setting up CI/CD builds
- Optimizing build performance
- Generating source code
- Managing releases and versions
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install fix-build-google-auto-maven-plugin-configuration - After installation, invoke the skill by name or use
/fix-build-google-auto-maven-plugin-configuration - Provide required inputs per the skill's parameter spec and get structured output
What is maven-plugin-configuration?
Use when configuring Maven plugins, setting up common plugins like compiler, surefire, jar, or creating custom plugin executions. It is an AI Agent Skill for Claude Code / OpenClaw, with 76 downloads so far.
How do I install maven-plugin-configuration?
Run "/install fix-build-google-auto-maven-plugin-configuration" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is maven-plugin-configuration free?
Yes, maven-plugin-configuration is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does maven-plugin-configuration support?
maven-plugin-configuration is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created maven-plugin-configuration?
It is built and maintained by wu-uk (@wu-uk); the current version is v0.1.0.