Lifecycles Reference

Maven defines 4 lifecycles in org.apache.maven.lifecycle.providers package:

default Lifecycle

default lifecycle is defined only with phases, without any associated plugin binding: plugins bindings for this lifecycle are defined separately for each packaging:

  1. private static final String[] PHASES = {
  2. "validate",
  3. "initialize",
  4. "generate-sources",
  5. "process-sources",
  6. "generate-resources",
  7. "process-resources",
  8. "compile",
  9. "process-classes",
  10. "generate-test-sources",
  11. "process-test-sources",
  12. "generate-test-resources",
  13. "process-test-resources",
  14. "test-compile",
  15. "process-test-classes",
  16. "test",
  17. "prepare-package",
  18. "package",
  19. "pre-integration-test",
  20. "integration-test",
  21. "post-integration-test",
  22. "verify",
  23. "install",
  24. "deploy"
  25. };

clean Lifecycle

clean lifecycle phases are defined with their plugins bindings:

  1. private static final String[] PHASES = {"pre-clean", "clean", "post-clean"};
  2.  
  3. private static final String MAVEN_CLEAN_PLUGIN_VERSION = "3.2.0";
  4.  
  5. private static final String[] BINDINGS = {
  6. "clean", "org.apache.maven.plugins:maven-clean-plugin:" + MAVEN_CLEAN_PLUGIN_VERSION + ":clean"
  7. };

site Lifecycle

site lifecycle phases are defined with their plugins bindings:

  1. private static final String[] PHASES = {"pre-site", "site", "post-site", "site-deploy"};
  2.  
  3. private static final String MAVEN_SITE_PLUGIN_VERSION = "3.12.1";
  4.  
  5. private static final String[] BINDINGS = {
  6. "site", "org.apache.maven.plugins:maven-site-plugin:" + MAVEN_SITE_PLUGIN_VERSION + ":site",
  7. "site-deploy", "org.apache.maven.plugins:maven-site-plugin:" + MAVEN_SITE_PLUGIN_VERSION + ":deploy"
  8. };

wrapper Lifecycle

wrapper lifecycle phases are defined with their plugins bindings:

  1. private static final String[] PHASES = {"wrapper"};
  2.  
  3. private static final String MAVEN_WRAPPER_PLUGIN_VERSION = "3.2.0";
  4.  
  5. private static final String[] BINDINGS = {
  6. "wrapper", "org.apache.maven.plugins:maven-wrapper-plugin:" + MAVEN_WRAPPER_PLUGIN_VERSION + ":wrapper"
  7. };