gnodet commented on code in PR #2066: URL: https://github.com/apache/maven/pull/2066#discussion_r1932535453
########## api/maven-api-core/src/main/java/org/apache/maven/api/plugin/Mojo.java: ########## @@ -35,11 +35,12 @@ @ThreadSafe public interface Mojo { Review Comment: There's a small incoherence between the javadoc on the class which talks about MojoException, which is not the only exception thrown anymore. Going through AI, It came up with: ``` /** * Represents the contract for Mojos to interact with the Maven infrastructure. * Implementations of this interface define specific build-process behaviors * that are triggered during a Maven build lifecycle. * * The primary entry point is the {@link #execute()} method, which encapsulates * the behavior of the Mojo and serves as the integration point with Maven. * This method may throw an {@link Exception} to signal any issues that prevent * successful execution of the Mojo. * * <p>Annotations:</p> * <ul> * <li>{@link Experimental}: Indicates that this interface or its implementation * may still be evolving and could change in future versions.</li> * <li>{@link FunctionalInterface}: Denotes that this is a functional interface, * allowing implementations as lambda expressions or method references.</li> * <li>{@link Consumer}: Signifies that this type is intended to be implemented * or extended by Maven plugins or extensions and consumed by Maven itself.</li> * <li>{@link ThreadSafe}: Implies that implementations of this interface must * be safe to invoke from multiple threads concurrently.</li> * </ul> * * @since 4.0.0 */ @Experimental @FunctionalInterface @Consumer @ThreadSafe public interface Mojo { /** * Executes the behavior defined by this {@code Mojo}. This method is invoked * during the Maven build lifecycle to perform the Mojo's designated task. * * <p>Implementations should handle any task-specific logic and may communicate * errors by throwing an {@link Exception}. Error conditions should provide * sufficient detail to aid troubleshooting.</p> * * @throws Exception if any issue occurs that prevents the successful execution * of the Mojo */ void execute() throws Exception; } ``` which looks better to me. Wdyt ? -- 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-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org