What is MOJO in Maven?

As written here:

A Maven Plugin is a Maven artifact which contains a plugin descriptor and one or more Mojos. A Mojo can be thought of as a goal in Maven, and every goal corresponds to a Mojo. The compiler:compile goal corresponds to the CompilerMojo class in the Maven Compiler Plugin, and the jar:jar goal corresponds to the JarMojo class in the Maven Jar Plugin. When you write your own plugin, you are simply grouping together a set of related Mojos (or goals) in a single plugin artifact.

A Mojo simply associates with a Maven goal, so we can say a Mojo is much more than just a goal in Maven.


Yes, from http://maven.apache.org/plugin-developers/index.html:

What is a Mojo? 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 short, a mojo is a maven goal, to extend functionality not already found in maven.


  • MOJO (Maven Old Java Object) is a goal in Maven.

  • In maven, everything is done by plugin, a plugin has one or more related mojos i.e. goals.

  • Mojo is single unit of task in maven.

for example : elicpse:eclipse the eclipse plugin with eclipse goal is a MOJO


The Maven site says Mojo is the combination of "Maven" + "POJO (Plain Old Java Object)". So then, MOJO = Maven Old Java Object.

But another, different answer at Maven: The Complete Reference which I think is from the same group of people that are managing the Maven site suggest Mojo is meant to mean Magical POJO.