Friday, August 7, 2009

Learned Today: Maven Plugin Configuration

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.

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

1 comment:

  1. great! many thanks - this was the missing link in my build today...


Related Posts Plugin for WordPress, Blogger...