A phase is a step in the build lifecycle, which is an ordered sequence of phases.
When a phase is given, Maven will execute every phase in the sequence up to and including the one defined.
Phases are actually mapped to underlying goals.
The specific goals executed per phase is dependant upon the packaging type of the project. For example, package executes jar:jar if the project type is a JAR, and war:war is the project type is a WAR.
If we execute the compile phase,
mvn compile
the phases that actually get executed are:
Default Life cycle:
Others:
mvn phase
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference