You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/11/01 13:35:34 UTC

[GitHub] [maven-plugin-tools] kwin opened a new pull request, #170: [MPLUGIN-439] Support custom phases in Execute annotation

kwin opened a new pull request, #170:
URL: https://github.com/apache/maven-plugin-tools/pull/170

   Add Unit test for JavaAnnotationsMojoDescriptorExtractor


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-plugin-tools] kwin commented on a diff in pull request #170: [MPLUGIN-439] Support custom phases in Execute annotation

Posted by GitBox <gi...@apache.org>.
kwin commented on code in PR #170:
URL: https://github.com/apache/maven-plugin-tools/pull/170#discussion_r1016483036


##########
maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Execute.java:
##########
@@ -39,20 +39,31 @@
 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.
+     * This value takes precedence over the {@link #customPhase()}.
      * @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 {@link #phase} overrides the specified custom phase.
+     * Also specifying a custom phase overrides specifying a goal.
+     * This element should only be used for non-standard phases. For standard phases rather use {@link #phase()}.
+     * 
+     * @since 3.8.0
+     */
+    String customPhase() default "";

Review Comment:
   Agree, with https://github.com/apache/maven-plugin-tools/pull/170/commits/9ccc3223cf3e48e01668c72e15d58b9b05a25577 an exception is thrown in that case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-plugin-tools] kwin merged pull request #170: [MPLUGIN-439] Support custom phases in Execute annotation

Posted by GitBox <gi...@apache.org>.
kwin merged PR #170:
URL: https://github.com/apache/maven-plugin-tools/pull/170


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-plugin-tools] kwin commented on pull request #170: [MPLUGIN-439] Support custom phases in Execute annotation

Posted by GitBox <gi...@apache.org>.
kwin commented on PR #170:
URL: https://github.com/apache/maven-plugin-tools/pull/170#issuecomment-1308633667

   @gnodet Done in https://github.com/apache/maven/pull/865.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-plugin-tools] slawekjaranowski commented on a diff in pull request #170: [MPLUGIN-439] Support custom phases in Execute annotation

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #170:
URL: https://github.com/apache/maven-plugin-tools/pull/170#discussion_r1016239783


##########
maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Execute.java:
##########
@@ -39,20 +39,31 @@
 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.
+     * This value takes precedence over the {@link #customPhase()}.
      * @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 {@link #phase} overrides the specified custom phase.
+     * Also specifying a custom phase overrides specifying a goal.
+     * This element should only be used for non-standard phases. For standard phases rather use {@link #phase()}.
+     * 
+     * @since 3.8.0
+     */
+    String customPhase() default "";

Review Comment:
   maybe an error or at least warning if user defined both
   In many case users don't read a documentation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-plugin-tools] gnodet commented on pull request #170: [MPLUGIN-439] Support custom phases in Execute annotation

Posted by GitBox <gi...@apache.org>.
gnodet commented on PR #170:
URL: https://github.com/apache/maven-plugin-tools/pull/170#issuecomment-1308624640

   @kwin do you plan to create a similar PR for api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Execute.java ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org