You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brian Topping <to...@orb.org> on 2006/11/22 23:28:35 UTC

Configuring a Mojo Programmatically

I have two mojos in two different plugins, and I would like to use  
them together, one calling the other one to get some work done.   
Let's call them "parent" and "child".  The parent mojo needs to  
instantiate the child, and if the child has dependencies, should be  
able to have those properly instantiated too.

As best I can tell, this is the same subtree of calls that happens  
with DefaultPluginManager.getConfiguredMojo(), but it's a private  
method and I don't even have a MojoExecution for the child mojo to  
start with!

So I'm thinking there has to be a better way to do this or just write  
off the parent->child relationship as impractical.  Assembly seems to  
be the only plugin that even tries this, and it doesn't do it to the  
level that I am looking at here.

If anyone has ideas or is laughing because this is "so not going to  
work", please do speak up :-)

Happy indigenous turkey liberation day for those of you that  
celebrate such days.

Brian

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