Lifecycle of a maven project

Default maven lifecycle contains 7 phases that is described below:

  • validate – Validate phase check the project is correct or not and also check all necessary information that is required for build is available or not.
  • compile – Compile phase compile the source code of the project.
  • test – Test phase the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed.
  • package – Package phase take the compiled code and package it in its distributable format, such as a JAR or WAR.
  • verify – Verify phase run any checks on results of integration tests to ensure quality criteria are met
  • install – Install phase install the package into the local repository that is use as a dependency in other projects locally.
  • deploy – Deploy phase done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.

Leave a comment