{"id":31338,"date":"2022-09-23T06:24:15","date_gmt":"2022-09-23T06:24:15","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=31338"},"modified":"2022-12-23T05:47:02","modified_gmt":"2022-12-23T05:47:02","slug":"maven-tutorials-maven-lifecycle-phases-goal","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/maven-tutorials-maven-lifecycle-phases-goal\/","title":{"rendered":"Maven Tutorials: Maven Lifecycle, Phases &#038; Goal"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What is Lifecycle?<\/h2>\n\n\n\n<p>A life cycle is a series of stages a living thing goes through during its life. All plants and animals go through life cycles. It is helpful to use diagrams to show the stages, which often include starting as a seed, egg, or live birth, then growing up and reproducing. Life cycles repeat again and again.<\/p>\n\n\n\n<p>But we use life cycle keyword in non-living world as well. Any object or creation including software dev has lifecycle.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Human Lifecycle<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"295\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/human-life-cycle.jpg\" alt=\"\" class=\"wp-image-31339\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/human-life-cycle.jpg 950w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/human-life-cycle-300x93.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/human-life-cycle-768x238.jpg 768w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Software Development Life Cycle<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/6_phases_of_software_development_life_cycle-1024x554.png\" alt=\"\" class=\"wp-image-31340\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/6_phases_of_software_development_life_cycle-1024x554.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/6_phases_of_software_development_life_cycle-300x162.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/6_phases_of_software_development_life_cycle-768x415.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/6_phases_of_software_development_life_cycle.png 1289w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Build Lifecycle in Maven for Managing Software Build Process<\/h2>\n\n\n\n<p>Maven is based around the central concept of a build lifecycle. What this means is that the process for building and distributing a particular artifact (project) is clearly defined.<\/p>\n\n\n\n<p>For the person building a project, this means that it is only necessary to learn a small set of commands to build any Maven project, and the&nbsp;<a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-pom.html\" target=\"_blank\" rel=\"noopener\">POM<\/a>&nbsp;will ensure they get the results they desired.<\/p>\n\n\n\n<p>There are three built-in build lifecycles: default, clean and site. The&nbsp;<code>default<\/code>&nbsp;lifecycle handles your project deployment, the&nbsp;<code>clean<\/code>&nbsp;lifecycle handles project cleaning, while the&nbsp;<code>site<\/code>&nbsp;lifecycle handles the creation of your project&#8217;s web site.<\/p>\n\n\n\n<p>Maven defines 3 lifecycles in&nbsp;META-INF\/plexus\/components.xml:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/maven.apache.org\/ref\/3.8.1\/maven-core\/lifecycles.html#default_Lifecycle\" target=\"_blank\" rel=\"noopener\">default Lifecycle<\/a><\/li><li><a href=\"https:\/\/maven.apache.org\/ref\/3.8.1\/maven-core\/lifecycles.html#clean_Lifecycle\" target=\"_blank\" rel=\"noopener\">clean Lifecycle<\/a><\/li><li><a href=\"https:\/\/maven.apache.org\/ref\/3.8.1\/maven-core\/lifecycles.html#site_Lifecycle\" target=\"_blank\" rel=\"noopener\">site Lifecycle<\/a><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"534\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/maven-lifecycle-phase-goal-1024x534.png\" alt=\"\" class=\"wp-image-31345\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/maven-lifecycle-phase-goal-1024x534.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/maven-lifecycle-phase-goal-300x156.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/maven-lifecycle-phase-goal-768x401.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/maven-lifecycle-phase-goal-1536x801.png 1536w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/maven-lifecycle-phase-goal.png 1900w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"505\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-37-1024x505.png\" alt=\"\" class=\"wp-image-31341\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-37-1024x505.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-37-300x148.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-37-768x379.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-37.png 1533w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"781\" height=\"823\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-38.png\" alt=\"\" class=\"wp-image-31342\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-38.png 781w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-38-285x300.png 285w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-38-768x809.png 768w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"363\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-39-1024x363.png\" alt=\"\" class=\"wp-image-31343\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-39-1024x363.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-39-300x106.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-39-768x272.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-39.png 1042w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"510\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/mvn-plugins-package-goals.png\" alt=\"\" class=\"wp-image-31346\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/mvn-plugins-package-goals.png 572w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/mvn-plugins-package-goals-300x267.png 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"318\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/Maven_LifeCycle_Table.png\" alt=\"\" class=\"wp-image-31349\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/Maven_LifeCycle_Table.png 675w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/Maven_LifeCycle_Table-300x141.png 300w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/figure>\n\n\n\n<p>Each of these build lifecycles is defined by a different list of build phases, wherein a build phase represents a stage in the lifecycle.<\/p>\n\n\n\n<p>For example, the default lifecycle comprises of the following phases (for a complete list of the lifecycle phases, refer to the&nbsp;<a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#Lifecycle_Reference\" target=\"_blank\" rel=\"noopener\">Lifecycle Reference<\/a>):<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>validate<\/code>&nbsp;&#8211; validate the project is correct and all necessary information is available<\/li><li><code>compile<\/code>&nbsp;&#8211; compile the source code of the project<\/li><li><code>test<\/code>&nbsp;&#8211; test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed<\/li><li><code>package<\/code>&nbsp;&#8211; take the compiled code and package it in its distributable format, such as a JAR.<\/li><li><code>verify<\/code>&nbsp;&#8211; run any checks on results of integration tests to ensure quality criteria are met<\/li><li><code>install<\/code>&nbsp;&#8211; install the package into the local repository, for use as a dependency in other projects locally<\/li><li><code>deploy<\/code>&nbsp;&#8211; done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.<\/li><\/ul>\n\n\n\n<p>These lifecycle phases (plus the other lifecycle phases not shown here) are executed sequentially to complete the\u00a0<code>default<\/code>\u00a0lifecycle. Given the lifecycle phases above, this means that when the default lifecycle is used, Maven will first validate the project, then will try to compile the sources, run those against the tests, package the binaries (e.g. jar), run integration tests against that package, verify the integration tests, install the verified package to the local repository, then deploy the installed package to a remote repository.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"480\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/Maven-Life-Cycle-1.jpg\" alt=\"\" class=\"wp-image-31347\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/Maven-Life-Cycle-1.jpg 802w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/Maven-Life-Cycle-1-300x180.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/Maven-Life-Cycle-1-768x460.jpg 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"437\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-40-1024x437.png\" alt=\"\" class=\"wp-image-31344\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-40-1024x437.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-40-300x128.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-40-768x327.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-40.png 1534w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"922\" height=\"631\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-41.png\" alt=\"\" class=\"wp-image-31348\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-41.png 922w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-41-300x205.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2022\/09\/image-41-768x526.png 768w\" sizes=\"auto, (max-width: 922px) 100vw, 922px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Lifecycle Reference<\/h2>\n\n\n\n<p>The following lists all build phases of the&nbsp;<code>default<\/code>,&nbsp;<code>clean<\/code>&nbsp;and&nbsp;<code>site<\/code>&nbsp;lifecycles, which are executed in the order given up to the point of the one specified.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"clean-lifecycle\"><a><\/a>Clean Lifecycle<a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#clean-lifecycle\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>Description<\/th><\/tr><tr><td><code>pre-clean<\/code><\/td><td>execute processes needed prior to the actual project cleaning<\/td><\/tr><tr><td><code>clean<\/code><\/td><td>remove all files generated by the previous build<\/td><\/tr><tr><td><code>post-clean<\/code><\/td><td>execute processes needed to finalize the project cleaning<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"default-lifecycle\"><a><\/a>Default Lifecycle<a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#default-lifecycle\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>Description<\/th><\/tr><tr><td><code>validate<\/code><\/td><td>validate the project is correct and all necessary information is available.<\/td><\/tr><tr><td><code>initialize<\/code><\/td><td>initialize build state, e.g. set properties or create directories.<\/td><\/tr><tr><td><code>generate-sources<\/code><\/td><td>generate any source code for inclusion in compilation.<\/td><\/tr><tr><td><code>process-sources<\/code><\/td><td>process the source code, for example to filter any values.<\/td><\/tr><tr><td><code>generate-resources<\/code><\/td><td>generate resources for inclusion in the package.<\/td><\/tr><tr><td><code>process-resources<\/code><\/td><td>copy and process the resources into the destination directory, ready for packaging.<\/td><\/tr><tr><td><code>compile<\/code><\/td><td>compile the source code of the project.<\/td><\/tr><tr><td><code>process-classes<\/code><\/td><td>post-process the generated files from compilation, for example to do bytecode enhancement on Java classes.<\/td><\/tr><tr><td><code>generate-test-sources<\/code><\/td><td>generate any test source code for inclusion in compilation.<\/td><\/tr><tr><td><code>process-test-sources<\/code><\/td><td>process the test source code, for example to filter any values.<\/td><\/tr><tr><td><code>generate-test-resources<\/code><\/td><td>create resources for testing.<\/td><\/tr><tr><td><code>process-test-resources<\/code><\/td><td>copy and process the resources into the test destination directory.<\/td><\/tr><tr><td><code>test-compile<\/code><\/td><td>compile the test source code into the test destination directory<\/td><\/tr><tr><td><code>process-test-classes<\/code><\/td><td>post-process the generated files from test compilation, for example to do bytecode enhancement on Java classes.<\/td><\/tr><tr><td><code>test<\/code><\/td><td>run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed.<\/td><\/tr><tr><td><code>prepare-package<\/code><\/td><td>perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package.<\/td><\/tr><tr><td><code>package<\/code><\/td><td>take the compiled code and package it in its distributable format, such as a JAR.<\/td><\/tr><tr><td><code>pre-integration-test<\/code><\/td><td>perform actions required before integration tests are executed. This may involve things such as setting up the required environment.<\/td><\/tr><tr><td><code>integration-test<\/code><\/td><td>process and deploy the package if necessary into an environment where integration tests can be run.<\/td><\/tr><tr><td><code>post-integration-test<\/code><\/td><td>perform actions required after integration tests have been executed. This may including cleaning up the environment.<\/td><\/tr><tr><td><code>verify<\/code><\/td><td>run any checks to verify the package is valid and meets quality criteria.<\/td><\/tr><tr><td><code>install<\/code><\/td><td>install the package into the local repository, for use as a dependency in other projects locally.<\/td><\/tr><tr><td><code>deploy<\/code><\/td><td>done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"site-lifecycle\"><a><\/a>Site Lifecycle<a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#site-lifecycle\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>Description<\/th><\/tr><tr><td><code>pre-site<\/code><\/td><td>execute processes needed prior to the actual project site generation<\/td><\/tr><tr><td><code>site<\/code><\/td><td>generate the project&#8217;s site documentation<\/td><\/tr><tr><td><code>post-site<\/code><\/td><td>execute processes needed to finalize the site generation, and to prepare for site deployment<\/td><\/tr><tr><td><code>site-deploy<\/code><\/td><td>deploy the generated site documentation to the specified web server<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Built-in Lifecycle Bindings<\/h2>\n\n\n\n<p>Some phases have goals bound to them by default. And for the default lifecycle, these bindings depend on the packaging value. Here are some of the goal-to-build-phase bindings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"clean-lifecycle-bindings\"><a><\/a>Clean Lifecycle Bindings<a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#clean-lifecycle-bindings\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>plugin:goal<\/th><\/tr><tr><td><code>clean<\/code><\/td><td><code>clean:clean<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"default-lifecycle-bindings-packaging-ejb-ejb3-jar-par-rar-war\"><a><\/a>Default Lifecycle Bindings &#8211; Packaging&nbsp;<code>ejb<\/code>&nbsp;\/&nbsp;<code>ejb3<\/code>&nbsp;\/&nbsp;<code>jar<\/code>&nbsp;\/&nbsp;<code>par<\/code>&nbsp;\/&nbsp;<code>rar<\/code>&nbsp;\/&nbsp;<code>war<\/code><a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#default-lifecycle-bindings-packaging-ejb-ejb3-jar-par-rar-war\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>plugin:goal<\/th><\/tr><tr><td><code>process-resources<\/code><\/td><td><code>resources:resources<\/code><\/td><\/tr><tr><td><code>compile<\/code><\/td><td><code>compiler:compile<\/code><\/td><\/tr><tr><td><code>process-test-resources<\/code><\/td><td><code>resources:testResources<\/code><\/td><\/tr><tr><td><code>test-compile<\/code><\/td><td><code>compiler:testCompile<\/code><\/td><\/tr><tr><td><code>test<\/code><\/td><td><code>surefire:test<\/code><\/td><\/tr><tr><td><code>package<\/code><\/td><td><code>ejb:ejb<\/code>&nbsp;<em>or<\/em>&nbsp;<code>ejb3:ejb3<\/code>&nbsp;<em>or<\/em>&nbsp;<code>jar:jar<\/code>&nbsp;<em>or<\/em>&nbsp;<code>par:par<\/code>&nbsp;<em>or<\/em>&nbsp;<code>rar:rar<\/code>&nbsp;<em>or<\/em>&nbsp;<code>war:war<\/code><\/td><\/tr><tr><td><code>install<\/code><\/td><td><code>install:install<\/code><\/td><\/tr><tr><td><code>deploy<\/code><\/td><td><code>deploy:deploy<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"default-lifecycle-bindings-packaging-ear\"><a><\/a>Default Lifecycle Bindings &#8211; Packaging&nbsp;<code>ear<\/code><a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#default-lifecycle-bindings-packaging-ear\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>plugin:goal<\/th><\/tr><tr><td><code>generate-resources<\/code><\/td><td><code>ear:generate-application-xml<\/code><\/td><\/tr><tr><td><code>process-resources<\/code><\/td><td><code>resources:resources<\/code><\/td><\/tr><tr><td><code>package<\/code><\/td><td><code>ear:ear<\/code><\/td><\/tr><tr><td><code>install<\/code><\/td><td><code>install:install<\/code><\/td><\/tr><tr><td><code>deploy<\/code><\/td><td><code>deploy:deploy<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"default-lifecycle-bindings-packaging-maven-plugin\"><a><\/a>Default Lifecycle Bindings &#8211; Packaging&nbsp;<code>maven-plugin<\/code><a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#default-lifecycle-bindings-packaging-maven-plugin\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>plugin:goal<\/th><\/tr><tr><td><code>generate-resources<\/code><\/td><td><code>plugin:descriptor<\/code><\/td><\/tr><tr><td><code>process-resources<\/code><\/td><td><code>resources:resources<\/code><\/td><\/tr><tr><td><code>compile<\/code><\/td><td><code>compiler:compile<\/code><\/td><\/tr><tr><td><code>process-test-resources<\/code><\/td><td><code>resources:testResources<\/code><\/td><\/tr><tr><td><code>test-compile<\/code><\/td><td><code>compiler:testCompile<\/code><\/td><\/tr><tr><td><code>test<\/code><\/td><td><code>surefire:test<\/code><\/td><\/tr><tr><td><code>package<\/code><\/td><td><code>jar:jar<\/code>&nbsp;<em>and<\/em>&nbsp;<code>plugin:addPluginArtifactMetadata<\/code><\/td><\/tr><tr><td><code>install<\/code><\/td><td><code>install:install<\/code><\/td><\/tr><tr><td><code>deploy<\/code><\/td><td><code>deploy:deploy<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"default-lifecycle-bindings-packaging-pom\"><a><\/a>Default Lifecycle Bindings &#8211; Packaging&nbsp;<code>pom<\/code><a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#default-lifecycle-bindings-packaging-pom\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>plugin:goal<\/th><\/tr><tr><td><code>package<\/code><\/td><td><\/td><\/tr><tr><td><code>install<\/code><\/td><td><code>install:install<\/code><\/td><\/tr><tr><td><code>deploy<\/code><\/td><td><code>deploy:deploy<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"site-lifecycle-bindings\"><a><\/a>Site Lifecycle Bindings<a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-the-lifecycle.html#site-lifecycle-bindings\" target=\"_blank\" rel=\"noopener\"><\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Phase<\/th><th>plugin:goal<\/th><\/tr><tr><td><code>site<\/code><\/td><td><code>site:site<\/code><\/td><\/tr><tr><td><code>site-deploy<\/code><\/td><td><code>site:deploy<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>What is Lifecycle? A life cycle is a series of stages a living thing goes through during its life. All plants and animals go through life cycles. It is helpful to use diagrams to show the stages, which often include starting as a seed, egg, or live birth, then growing up and reproducing. Life cycles&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-31338","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=31338"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31338\/revisions"}],"predecessor-version":[{"id":31350,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31338\/revisions\/31350"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=31338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=31338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=31338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}