Maven - keshavbaweja-git/guides GitHub Wiki

Built-in build lifecycles

  • default
  • clean
  • site

Build lifecycle reference

Build lifecycle overview

  • A build lifecycle is composed of build phases that are executed sequentially
  • A build phase is responsible for a specific step in the build lifecycle
  • A build phase is accomplished by bounding it to one or more plugin goals
  • Default bindings of build phases to plugin goals is here
  • A plugin goal represents a specific task (finer than a build phase) which contributes to the building and managing of a project. It may be bound to zero or more build phases.

Configure lifecycle bindings

1. Packaging

Each packaging has a binding of lifecycle phases to plugin goals as defined here

2. Plugins

Commands

Create a project

mvn -B archetype:generate ^
  -DarchetypeCatalog=internal ^
  -DarchetypeGroupId=org.apache.maven.archetypes ^
  -DgroupId=com.xyz ^
  -DartifactId=sandbox