MAVEN defines three sets of lifecycles: Clean, default, site, and each life cycle contains stages (phase).
The three sets of lifecycles are independent of each other, but the phase in each life cycle are sequential, and the latter phase depend on the previous phase.
When a phase is executed, the phase in front of it executes sequentially, but does not trigger any phase in the other two sets of life cycles.
Such as:
----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
When running any of the life cycle phases, all the life cycle phases in front of it will be run, which is why when we run MVN install, the code is compiled, tested, packaged.
The plug-in is the core of Maven, and all of the actions are based on MAVEN operations, in order for a plugin to implement more similar functions, a plug-in
There may be multiple targets. Each phase of the lifecycle is executed by the corresponding plug-in and target, such as:
Plug-ins are configured through the build tag to specify the execution target by configuring execution and goal, and the phase of the plug-in binding is established through phase
For example:
Maven default plug-ins, so you do not need to display the configuration to perform the various stages of the Maven life cycle:
Maven Getting Started tutorial three----lifecycle and plugins