Maven Plugins Where to define and Configure

There are the build and the reporting plugins:

  • Build plugins will be executed during the build and then, they should be configured in the <build/> element.
  • Reporting plugins will be executed during the site generation and they should be configured in the <reporting/> element.

 

Specify them in the <build><pluginManagement/></build> elements for each build plugins ( generally in a parent POM).

For reporting plugins, specify each version in the <reporting><plugins/></reporting> elements (and also in the <build><pluginManagement/></build> )

The configuration of plugin behaviour can be done using

<configuration>Configurations inside the <executions> tag differ from those that are outside <executions> in that they cannot be used from a direct command line invocation. Instead they are only applied when the lifecycle phase they are bound to are invoked. Alternatively, if you move a configuration section outside of the executions section, it will apply globally to all invocations of the plugin.

 

Read this and complete the understanding

http://maven.apache.org/pom.html
References
http://maven.apache.org/guides/mini/guide-configuring-plugins.html
http://maven.apache.org/xsd/maven-4.0.0.xsd

No comments:

Post a Comment

Please share your views and comments below.

Thank You.