Table of Contents

Maven - Phase (Build lifecycle)

About

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.

Example

If we execute the compile phase,

mvn compile

the phases that actually get executed are:

Most common phases

Default Life cycle:

Others:

Management

Execute

mvn phase

List

https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference

Documentation / Reference