You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kw...@apache.org on 2022/11/09 12:05:48 UTC
[maven] branch master updated: [MPLUGIN-439] Support custom lifecycle phase ids in Execute annotation (#865)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push:
new 4d3a82f59 [MPLUGIN-439] Support custom lifecycle phase ids in Execute annotation (#865)
4d3a82f59 is described below
commit 4d3a82f59614ae5595b897ff06e18bba4466487f
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Nov 9 13:05:38 2022 +0100
[MPLUGIN-439] Support custom lifecycle phase ids in Execute annotation (#865)
---
.../org/apache/maven/api/plugin/annotations/Execute.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java
index e4f870786..6aec36666 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java
@@ -41,20 +41,30 @@ import org.apache.maven.api.annotations.Experimental;
public @interface Execute
{
/**
- * lifecycle phase to fork. Note that specifying a phase overrides specifying a goal.
+ * Lifecycle phase to fork. Note that specifying a phase overrides specifying a goal.
+ * For custom lifecycle phase ids use {@link #customPhase()} instead.
+ * Only one of {@link #customPhase()} and {@link #phase()} must be set.
* @return the phase
*/
LifecyclePhase phase() default LifecyclePhase.NONE;
/**
- * goal to fork. Note that specifying a phase overrides specifying a goal. The specified <code>goal</code> must be
+ * Custom lifecycle phase to fork. Note that specifying a phase overrides specifying a goal.
+ * This element should only be used for non-standard phases. For standard phases rather use {@link #phase()}.
+ * Only one of {@link #customPhase()} and {@link #phase()} must be set.
+ * @return the custom phase id
+ */
+ String customPhase() default "";
+
+ /**
+ * Goal to fork. Note that specifying a phase overrides specifying a goal. The specified <code>goal</code> must be
* another goal of the same plugin.
* @return the goal
*/
String goal() default "";
/**
- * lifecycle id of the lifecycle that defines {@link #phase()}. Only valid in combination with {@link #phase()}. If
+ * Lifecycle id of the lifecycle that defines {@link #phase()}. Only valid in combination with {@link #phase()}. If
* not specified, Maven will use the lifecycle of the current build.
*
* @see <a href="https://maven.apache.org/maven-plugin-api/lifecycle-mappings.html">Lifecycle Mappings</a>