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