Re: Re: Use a mojo within a mojo

2009-10-28 Thread Tsuyoshi Ito

Hi Wayne

Thanks for the answer, obviously my question wasn't clear enough: I  
read that mojos are components, how do I get such a component injected  
within another mojo?


A Mojo is much more than just a goal in Maven, it is a component  
managed by Plexus that can include references to other Plexus  
components.


From maven definitive guide, chapter 17.2.4. What is a Plugin?



Extract the method to a utility class/jar/artifact which you can
depend on independently of your mojos, and then call it from each
mojo. And then, yes, you'll need to declare each plugin in your pom.


Tsuy

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Use a mojo within a mojo

2009-10-27 Thread Tsuyoshi Ito

Hello,

I try to use a mojo B within a mojo A.  I develop a custom plugin  
which should use AddSourceMojo within my custom plugin for adding new   
sources. Is this possible?


Or do I have to define plugin A and plugin B in the plugins  
section of the pom.


Found some hints in the maven definitive guide but I was not able to  
transfer it to my cases.


Cheers
Tsuy

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org