MongodProcess mongod = (MongodProcess)getPluginContext().get(StartEmbeddedMongoMojo
.MONGOD_CONTEXT_PROPERTY_NAME);
if (mongod != null) {
mongod.stop();
} else {
throw new MojoFailureException("No mongod process found, it appears embedmongo:start was not called");
}
}