MAVEN is based around the core concept of building life cycle, the whole project is created and deployed around the life cycle, a life cycle consists of a number of life cycle stages.
Maven has three built-in default lifecycles, respectively,, clean and site.
The default life cycle process for your project deployment, clean lifecycle processing project cleaning, and (site) site life cycle processes the creation of your project's Web document.
Each of these build lifecycles consists of a different list of stages, where the build phase is defined in a phase of the life cycle.
For example, the life cycle of default includes the following stages (for a complete list of life cycle stages, see Lifecycle Reference):
Validate-Verify that the project is correct, all necessary information, please visit
Compile-compiling the source code of the project
Test-Compile the source code using the appropriate unit test framework. These tests should not require code to be packaged or deployed
Package-takes the compiled code and packages it in its distribution format, such as a jar.
Verify-run the inspection of integrated test results to ensure that quality standards are met
Install-Package is installed locally in the local repository and is used as a dependency on other projects
Deploy-Complete the build environment, copy the final package to the remote repository and share it with other developers and projects
When the default life cycle, MAVEN validates the project first, then attempts to compile the source code, run those binaries (such as jars) for testing, package, run integration tests against the package, validate the integration test, install the validation package to the local repository, and finally install the package to the remote repository.
Common maven command line:
MVN clean
Delete any build output (such as a class file or a jar file)
MVN test
Run unit tests for a project
MVN Install
Copy project artifacts to your local repository
MVN Deploy
Copy project artifacts to a remote repository
MVN site
Create a project document (such as a report or Javadoc).
MVN Compile
Compile
MVN Validate
Http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Maven life cycle, and maven common commands