[MNG-7267] update lifecycle documentation after switch from Plexus XML

This commit is contained in:
Hervé Boutemy 2022-01-08 15:57:39 +01:00
parent e617d51bd4
commit 8bde888dc8
13 changed files with 45 additions and 23 deletions

View File

@ -33,6 +33,7 @@ public final class CleanLifecycleProvider
{
protected static final String LIFECYCLE_ID = "clean";
// START SNIPPET: clean
private static final String[] PHASES = {
"pre-clean",
"clean",
@ -42,6 +43,7 @@ public final class CleanLifecycleProvider
private static final String[] BINDINGS = {
"clean", "org.apache.maven.plugins:maven-clean-plugin:3.1.0:clean"
};
// END SNIPPET: clean
@Inject
public CleanLifecycleProvider()

View File

@ -33,6 +33,7 @@ public final class DefaultLifecycleProvider
{
protected static final String LIFECYCLE_ID = "default";
// START SNIPPET: default
private static final String[] PHASES = {
"validate",
"initialize",
@ -58,6 +59,7 @@ public final class DefaultLifecycleProvider
"install",
"deploy"
};
// END SNIPPET: default
@Inject
public DefaultLifecycleProvider()

View File

@ -33,6 +33,7 @@ public final class SiteLifecycleProvider
{
protected static final String LIFECYCLE_ID = "site";
// START SNIPPET: site
private static final String[] PHASES = {
"pre-site",
"site",
@ -41,9 +42,10 @@ public final class SiteLifecycleProvider
};
private static final String[] BINDINGS = {
"site", "org.apache.maven.plugins:maven-site-plugin:3.9.1:site",
"site", "org.apache.maven.plugins:maven-site-plugin:3.9.1:site",
"site-deploy", "org.apache.maven.plugins:maven-site-plugin:3.9.1:deploy"
};
// END SNIPPET: site
@Inject
public SiteLifecycleProvider()

View File

@ -33,6 +33,7 @@ public final class WrapperLifecycleProvider
{
protected static final String LIFECYCLE_ID = "wrapper";
// START SNIPPET: wrapper
private static final String[] PHASES =
{
"wrapper"
@ -41,6 +42,7 @@ public final class WrapperLifecycleProvider
private static final String[] BINDINGS = {
"wrapper", "org.apache.maven.plugins:maven-wrapper-plugin:3.1.0:wrapper"
};
// END SNIPPET: wrapper
@Inject
public WrapperLifecycleProvider()

View File

@ -31,6 +31,7 @@ import javax.inject.Singleton;
public final class EarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
// START SNIPPET: ear
private static final String[] BINDINGS =
{
"generate-resources", "org.apache.maven.plugins:maven-ear-plugin:3.1.2:generate-application-xml",
@ -39,6 +40,7 @@ public final class EarLifecycleMappingProvider
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
// END SNIPPET: ear
@Inject
public EarLifecycleMappingProvider()

View File

@ -31,6 +31,7 @@ import javax.inject.Singleton;
public final class EjbLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
// START SNIPPET: ejb
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
@ -42,6 +43,7 @@ public final class EjbLifecycleMappingProvider
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
// END SNIPPET: ejb
@Inject
public EjbLifecycleMappingProvider()

View File

@ -31,6 +31,7 @@ import javax.inject.Singleton;
public final class JarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
// START SNIPPET: jar
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
@ -42,6 +43,7 @@ public final class JarLifecycleMappingProvider
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
// END SNIPPET: jar
@Inject
public JarLifecycleMappingProvider()

View File

@ -31,6 +31,7 @@ import javax.inject.Singleton;
public final class MavenPluginLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
// START SNIPPET: maven-plugin
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
@ -44,6 +45,7 @@ public final class MavenPluginLifecycleMappingProvider
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
// END SNIPPET: maven-plugin
@Inject
public MavenPluginLifecycleMappingProvider()

View File

@ -31,11 +31,13 @@ import javax.inject.Singleton;
public final class PomLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
// START SNIPPET: pom
private static final String[] BINDINGS =
{
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
// END SNIPPET: pom
@Inject
public PomLifecycleMappingProvider()

View File

@ -31,6 +31,7 @@ import javax.inject.Singleton;
public final class RarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
// START SNIPPET: rar
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
@ -42,6 +43,7 @@ public final class RarLifecycleMappingProvider
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
// END SNIPPET: rar
@Inject
public RarLifecycleMappingProvider()

View File

@ -31,6 +31,7 @@ import javax.inject.Singleton;
public final class WarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
// START SNIPPET: war
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
@ -42,6 +43,7 @@ public final class WarLifecycleMappingProvider
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
// END SNIPPET: war
@Inject
public WarLifecycleMappingProvider()

View File

@ -16,45 +16,45 @@
~~ under the License.
---
Plugin Bindings for Default Lifecycle Reference
Plugins Bindings for Default Lifecycle Reference
---
Hervé Boutemy
---
2013-08-02
---
Plugin Bindings for <<<default>>> Lifecycle Reference
Plugins Bindings for <<<default>>> Lifecycle Reference
The {{{./lifecycles.html}<<<default>>> lifecycle}} is defined without any plugin binding; plugin bindings are defined separately
in <<<META-INF/plexus/default-bindings.xml>>> because they are specific for each packaging:
The {{{./lifecycles.html}<<<default>>> lifecycle}} is defined without any plugin binding; plugins bindings are defined separately
in {{{./apidocs/org/apache/maven/lifecycle/providers/packaging/package-summary.html}<<<org.apache.maven.lifecycle.providers.packaging>>>}} package
because they are specific for each packaging:
%{toc|fromDepth=2}
* Plugin bindings for <<<pom>>> packaging
%{snippet|id=pom-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
%{snippet|id=pom|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/PomLifecycleMappingProvider.java}
* Plugin bindings for <<<jar>>> packaging
%{snippet|id=jar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
%{snippet|id=jar|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/JarLifecycleMappingProvider.java}
* Plugin bindings for <<<ejb>>> packaging
%{snippet|id=ejb-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
%{snippet|id=ejb|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/EjbLifecycleMappingProvider.java}
* Plugin bindings for <<<maven-plugin>>> packaging
%{snippet|id=maven-plugin-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
%{snippet|id=maven-plugin|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/MavenPluginLifecycleMappingProvider.java}
* Plugin bindings for <<<war>>> packaging
%{snippet|id=war-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
%{snippet|id=war|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/WarLifecycleMappingProvider.java}
* Plugin bindings for <<<ear>>> packaging
%{snippet|id=ear-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
%{snippet|id=ear|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/EarLifecycleMappingProvider.java}
* Plugin bindings for <<<rar>>> packaging
%{snippet|id=rar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
%{snippet|id=rar|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/RarLifecycleMappingProvider.java}

View File

@ -25,31 +25,31 @@
Lifecycles Reference
Maven defines 4 lifecycles in <<<META-INF/plexus/components.xml>>>:
Maven defines 4 lifecycles in {{{./apidocs/org/apache/maven/lifecycle/providers/package-summary.html}<<<org.apache.maven.lifecycle.providers>>>}} package:
%{toc|fromDepth=2}
* <<<default>>> Lifecycle
<<<default>>> lifecycle is defined <<without>> any associated plugin.
Plugin bindings for this lifecycle are {{{./default-bindings.html}defined separately for every packaging}}:
<<<default>>> lifecycle is defined only with phases, <<without>> any associated plugin binding:
plugins bindings for this lifecycle are {{{./default-bindings.html}defined separately for each packaging}}:
%{snippet|id=lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/components.xml}
%{snippet|id=default|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/DefaultLifecycleProvider.java}
* <<<clean>>> Lifecycle
<<<clean>>> lifecycle is defined directly with its plugin bindings.
<<<clean>>> lifecycle phases are defined with their plugins bindings:
%{snippet|id=clean|file=${project.basedir}/src/main/resources/META-INF/plexus/components.xml}
%{snippet|id=clean|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/CleanLifecycleProvider.java}
* <<<site>>> Lifecycle
<<<site>>> lifecycle is defined directly with its plugin bindings.
<<<site>>> lifecycle phases are defined with their plugins bindings:
%{snippet|id=site|file=${project.basedir}/src/main/resources/META-INF/plexus/components.xml}
%{snippet|id=site|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/SiteLifecycleProvider.java}
* <<<wrapper>>> Lifecycle
<<<wrapper>>> lifecycle is defined directly with its plugin bindings.
<<<wrapper>>> lifecycle phases are defined with their plugins bindings:
%{snippet|id=wrapper|file=${project.basedir}/src/main/resources/META-INF/plexus/components.xml}
%{snippet|id=wrapper|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/WrapperLifecycleProvider.java}