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:
1.clean. The clean life cycle includes, for example, the following stages
1.1.pre-clean
1.2.clean
1.3.post-clean

The 2.default,default life cycle includes, for example, 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 includes, for example, 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. The later stages depend on the previous stage

The main way the command line runs the MAVEN command is to invoke the MAVEN lifecycle phase. For example, run 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 stages of a life cycle. Each plugin can have one or more targets. A phase of the corresponding life cycle for each goal


In detail, the phase of the lifecycle and the target of the plug-in are bound to each other to complete a detailed 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.