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 e4f870786a..6aec366662 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 @@ 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 goal 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 goal 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 Lifecycle Mappings