Maven allows you to implement and use custom plugins. These plugins allow additional behaviour to be bound to any phase of the Maven lifecycle.
Each Maven goal is created by implementing a MOJO (Maven Ordinary Java Object): a Java class implemented with annotations that describes how to invoke it.
The goal prefix of a plugin is derived from its artifact name. An artifact
hello-world-plugin creates a goal prefix
hello goal can then be run with
Following is a complete list of Maven's default build lifecycle phases. Each of these phases is invoked by adding it to the
mvn command, e.g.
It is sometimes useful to get the maven properties, such as the current version, in code. Here are some ways to to it.
This is a small code (xml) snippet to highlight how to use the taglist-maven-plugin to generate customized reports (of TODO, FIXME work ...)
Here is an example configuration for a basic maven ear plugin for packaging both .war and .jar artifacts