What is MOJO in Maven?

I'm reading about Maven right now and everywhere in a text I see this word (mojo). I approximately understand what it means, but I would not refuse from a good explanation. I tried to google, but found only non-maven explanations.

POJO - ok, but MOJO? Maven Old Java Object?


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.

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.

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.

H2O allows you to convert the models you have built to either a Plain Old Java Object (POJO) or a Model ObJect, Optimized (MOJO).

H2O-generated MOJO and POJO models are intended to be easily embeddable in any Java environment. The only compilation and runtime dependency for a generated model is the h2o-genmodel.jar file produced as the build output of these packages.

Users can refer to the following Quick Start files for more information about generating POJOs and MOJOs:

POJO Quick Start
MOJO Quick Start

Note: MOJOs are supported for GBM, DRF, and GLM models only.

Developers can refer to the the POJO and MOJO Model Javadoc.

  • 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

Need Your Help

class A declares multiple JSON fields

java json gson

i have a class A which has some private fields and the same class extends another class B which also has some private fields which are in class A.

how to add subject alernative name to ssl certs?

ssl ssl-certificate x509certificate keytool

I'm using openssl to create self-signed certs. I'm getting this error with the certs I generated: