maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Max Spring <m2spr...@springdot.org>
Subject programmatic instantiation of Maven Mojo?
Date Tue, 03 Sep 2013 18:02:22 GMT
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


Mime
View raw message