Maven life cycle, and maven common commands

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.