BuildCycle

Few things to remember about Maven Lifecycle:

    1. Maven defines 4 "steps" of a Build Process:

      1. Life Cycle: 3 Life cycles (aka build lifecycles) - Default, Clean, Site. References

      2. Build Phase: Each Life Cycle is made up of Phases - e.g. For default lifecycle: compile, test, package, install, etc

      3. Plugin Artifact that provide one or more goals. Based on packaging, a plugin:goal is bind to a phase. See

      4. Goals: The end task (action) that executes. A plugin can have one or more goals. When using plugin in a POM, we specify which goal to use. Additionally, we may specify the phase which needs to be bind with the plugin goal, incase the plugin definition does not have a default build phase.

    2. Maven parameter to run are either (or either, more than one):

      1. Phases e.g. mvn compile (compile is phase here)

      2. Plugin:Goal e.g. mvn compiler:compile (PS: compile is Goal here not a phase)

    1. When running a build phase, all Prior Phases runs. e.g.mvn deploy - all prior phases -> validate, compile, test, etc will run before this.

This is for quick reference could be incomplete. Please see this for detailed understanding,