Maven - Lifecycle

About

A Build Lifecycle is Made Up of Phases.

To call all phase, you only need to call the last build phase to be executed, deploy:

mvn deploy

If you call a build phase, it will execute not only that build phase, but also every build phase prior to the called build phase.

Default

  • clean: to remove the target directory
  • validate
  • compile: to compile your application sources
  • test: to execute the tests. The surefire plugin executes the test.
  • package: to archive your application
  • integration-test - process and deploy the package if necessary into an environment where integration tests can be run
  • verify - run any checks to verify the package is valid and meets quality criteria
  • install: to install the generated artifact (JAR file by default) in the local repository.
  • site: to generate the project documentation in target/site
  • deploy: copies the final package to the remote repository for sharing with other developers and projects.

Others

  • test-compile: to compile the tests but doesn't execute them
  • idea:idea: to generate an IntelliJ IDEA descriptor for the project
  • eclipse:eclipse: to generate a project file.

Documentation / Reference


Powered by ComboStrap