Maven life cycle and plugins

Source: Internet
Author: User

Maven life cycle and plugins


Life cycle:A series of stages in the construction process

Maven has three life cycles:
The 1.clean,clean life cycle consists of the following stages
1.1.pre-clean
1.2.clean
1.3.post-clean

The 2.default,default life cycle consists of the following stages
2.1.validate
2.2.intialize
2.3.generate-sources
2.4.process-sources
2.5.generate-resources
2.6.process-resources
2.7.complie
2.8.process-classes
2.9.generate-test-sources
2.10.process-test-sources
2.11.generate-test-resources
2.12.process-test-resources
2.13.test-complie
2.14.process-test-classes
2.15.test
2.16.prepare-package
2.17.package
2.18.pre-integration-test
2.19.integration-test
2.20.post-integration-test
2.21.verify
2.22.install
2.23.deploy

The 3.site,site life cycle consists of the following stages
3.1.pre-site
3.2.site
3.3.post-site
3.4.site-deploy

Each phase of the life cycle is dependent, and the latter phase depends on the previous stage

The main way the command line executes the MAVEN command is to invoke the Maven life cycle phase, such as executing the mvn clean install command
is to invoke the clean cycle in clean and before the previous phase and the default period before the install stage


plugin target:A plug-in can complete one or more life cycle phases, each plug-in can have one or more targets, and each target corresponds to a phase of the life cycle


Specifically, the phase of the lifecycle and the goals of the plug-in are bound to each other to accomplish a specific build task





Maven life cycle and plugins

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.