Apache Maven Creating a goal


Example

Goals are implemented by creating a MOJO. This is a class file annotated with annotations from maven-plugin-annotations.

@Mojo(name = "hello")
public final class HelloWorldMojo extends AbstractMojo {

    public void execute() throws MojoExecutionException, MojoFailureException {
         getLog().info("Hello world");
    }
}