Reality-Loop

Learned Today: Maven Plugin Configuration

August 07, 2009 | 0 Minute Read
This post was originally posted on my old blog.

There are different options for configuring maven plugins in a POM-hierarchy.

A plugin can be defined and configured in a parent-POM. Then it is executed for the parent itself and for all its children.
This is achieved in the build->plugins section of the POM.

A plugin can be configured only in a parent-POM and selectively included in any child of the parent. Then the plugin is only executed in the respective children.
Configuration happens in the build->pluginManagement->plugins section of the parent POM.
Activation in a child happens in the build->plugins section of the POM.

References:
Maven Doc: Plugins
Maven Doc: Plugin Management
Sonatype Blog: Optimal Maven Plugin configuration


http://www.google.com/s2/favicons?domain=twitter.com follow me on twitter, I need some friends :-)