This Maven Plugin takes the generated resource
AbstractMuleMojo.MULE_ARTIFACT_JSON, to look for the ID on it so that
through SPI can generate the
ExtensionModel properly. To do so, the invoker of the plugin must have the required
dependencies in its classpath.
Once it generates the
ExtensionModel in memory, it serializes it in and then adds to the current project. If we take
the HTTP plugin as sample, the generated JAR artifact will be:
/Users/someUser/.m2/repository/org/mule/modules/mule-module-http-ext/4.0-SNAPSHOT/mule-module-http-ext-4.0-SNAPSHOT-mule-plugin.jar
and the generated serialized JSON
ExtensionModel will be:
/Users/lautar0/.m2/repository/org/mule/modules/mule-module-http-ext/4.0-SNAPSHOT/mule-module-http-ext-4.0-SNAPSHOT-extension-model-4.0.0.json
This
Mojo must be executed on Mule Plugins that generate
ExtensionModel.