You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Max Spring <m2...@springdot.org> on 2013/09/03 20:02:22 UTC

programmatic instantiation of Maven Mojo?

Within a Mojo how can I programmatically get Mojo instances of other POM
files?

In my use case I have a Mojo X which allows to declare references to other
artifacts Y in the POM (let's say similar to the Depencency Plugin's
artifactItems).

When X executes I want to see whether Y's POM has also plugin X
configured. If this is the case, I want to parse out configuration values
of plugin X from POM Y.

My code so far is able to resolve Y's POM and construct a model. I'm now
looking into fiddling with Xpp3Dom to parse out the configuration
values. This seems stupid. Instead I'd like to use Maven's POM-to-Mojo
mapping mechanism.

I'm just unclear how to instantiate a Mojo "by hand".

Thanks!
-Max


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org