Creating a mojo

A maven plugin is composed of one or more mojos. And to start the creation of a maven plugin, you can use maven-archetype-mojo to create a mojo.

mvn archetype:create 
  -DgroupId=[your project's group id]
  -DartifactId=[your project's artifact id]
  -DarchetypeArtifactId=maven-archetype-mojo

This would then create a maven project.

.
 |-- src
 |   `-- main
 |       `-- java
 |           `-- [your project's package] 
 |               `-- MyMojo.java
  `-- pom.xml