The previous chapter explained the concept of Maven Lifecycle and Phases. Lifecycle phases are just steps without any capability to carryout some task and they delegate the actual work to Maven Plugins.
This chapter on Maven Plugins cover plugins goal, how they bind with lifecycle phases and plugin configuration.
The Maven core is small and it’s just capable of parsing XML files such
as pom.xml and manage lifecycle and phases. By itself, Maven doesn’t
know how to compile the code or even to make a JAR file. It is designed
to delegate most of the functionality to Maven Plugins. In fact, the
first time we ran something like
mvn install with a new Maven
installation, it retrieves most of the core Maven plugins from the
Central Maven Repository. Maven is - at its heart - a plugin execution
framework; all work is done by plugins.
Plugins are broadly grouped as build plugins and reporting plugins. Apache Maven Project provides around fifty plugins and some of the frequently used plugins are listed here.
Throughout the guide, we learn more about these plugins.
Apart from Apache Maven Project, many projects such as Hibernate, Tomcat, Jetty comes with plugin related to the project. For complete list of Plugins, refer Maven Plugin Directory.
In the next tutorial, we look at plugin goals.