[MPLUGIN-439] Support custom lifecycle phase ids in Execute annotation (#865)

This commit is contained in:
Konrad Windszus 2022-11-09 13:05:38 +01:00 committed by GitHub
parent 431e2b3eec
commit 4d3a82f596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 3 deletions

View File

@ -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>