Skip to content

Instantly share code, notes, and snippets.

@baijian
Last active December 11, 2015 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baijian/4561657 to your computer and use it in GitHub Desktop.
Save baijian/4561657 to your computer and use it in GitHub Desktop.
Maven have three lifecycles:clean default and site.
====
**clean lifecycle**
it has three phases
pre-clean
clean:delete the project's build directory(default target directory)
post-clean
**site lifecycle**
it is concerned with generating documentation for a project.
**default lifecycle**
validate: validate the project is correct and all necessary information is available
compile: compile the source code of the project
test: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package: take the compiled code and package it in its distributable format, such as a JAR.
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: install the package into the local repository, for use as a dependency in other projects locally
deploy: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
Examples
========
>>mvn clean install
it will first execute clean phase of clean lifecycle, the it will execute install phase of default lifecycle.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment