gnodet-bot commented on code in PR #14144:
URL: https://github.com/apache/maven/pull/14144#discussion_r4714889545


##########
api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java:
##########
@@ -37,24 +38,105 @@
 @Experimental
 public interface MojoExecution {
 
+    /** {@return the plugin that owns this execution} */
     @Nonnull
-    Plugin getPlugin();
+    Plugin plugin();
 
+    /**
+     * @deprecated Use {@link #plugin()} instead.
+     */
+    @Deprecated(since = "4.0.0", forRemoval = true)
     @Nonnull
-    PluginExecution getModel();
+    default Plugin getPlugin() {
+        return plugin();
+    }
 
+    /** {@return the execution model element, if any} */
     @Nonnull
-    MojoDescriptor getDescriptor();
+    Optional<PluginExecution> model();
 
+    /**
+     * @deprecated Use {@link #model()} instead.
+     */
+    @Deprecated(since = "4.0.0", forRemoval = true)
+    @Nullable
+    default PluginExecution getModel() {
+        return model().orElse(null);
+    }
+
+    /** {@return the descriptor of the mojo being executed} */
+    @Nonnull
+    MojoDescriptor descriptor();
+
+    /**
+     * @deprecated Use {@link #descriptor()} instead.
+     */
+    @Deprecated(since = "4.0.0", forRemoval = true)
+    @Nonnull
+    default MojoDescriptor getDescriptor() {
+        return descriptor();
+    }
+
+    /** {@return the execution identifier, or empty for a direct CLI 
invocation} */
+    @Nonnull
+    Optional<String> executionId();
+
+    /**
+     * @deprecated Use {@link #executionId()} instead.
+     */
+    @Deprecated(since = "4.0.0", forRemoval = true)
+    @Nullable
+    default String getExecutionId() {
+        return executionId().orElse(null);
+    }
+
+    /** {@return the goal being executed} */
+    @Nonnull
+    String goal();
+
+    /**
+     * @deprecated Use {@link #goal()} instead.
+     */
+    @Deprecated(since = "4.0.0", forRemoval = true)
     @Nonnull
-    String getExecutionId();
+    default String getGoal() {
+        return goal();
+    }
 
+    /** {@return the lifecycle phase this execution is bound to, or empty for 
a direct CLI invocation} */
     @Nonnull
-    String getGoal();
+    Optional<String> lifecyclePhase();
+
+    /**
+     * @deprecated Use {@link #lifecyclePhase()} instead.
+     */
+    @Deprecated(since = "4.0.0", forRemoval = true)
+    @Nullable
+    default String getLifecyclePhase() {
+        return lifecyclePhase().orElse(null);
+    }
 
+    /** {@return the merged configuration for this execution, if any} */
     @Nonnull
-    String getLifecyclePhase();
+    Optional<XmlNode> configuration();
 
+    /**
+     * @deprecated Use {@link #configuration()} instead.
+     */
+    @Deprecated(since = "4.0.0", forRemoval = true)

Review Comment:
   ⚠️ **Wrong `@since` tag for the backport branch.** This PR targets 
`maven-4.0.x`, so `isForkingExecution()` will first appear in a 4.0.x release — 
not 4.2.0.
   
   ```suggestion
        * @since 4.0.0
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to