What is a Mojo? A simple definition for Mojo is that Mojo is a Maven goal. This is not far from reality.
In order to be more accurate, we can say that a Mojo is a Maven plain Old Java Object. Each Mojo is an executable goal in Maven, and a plugin is a distribution of one or more related Mojos.
In practice, to create a Mojo, we must create a class extending the abstract class, as follows:
Such a class provides a utility method for common operations. Furthermore, it provides the abstract method,
public void execute() throws MojoExecutionException, to perform all the dirty work when the plugin is executed.
In order to associate our Mojo to a goal for our plugin, we have to use an annotation in Java ...