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