You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tsuyoshi Ito <ts...@trialox.org> on 2009/10/27 18:16:43 UTC
Use a mojo within a mojo
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Use a mojo within a mojo
Posted by Wayne Fay <wa...@gmail.com>.
> 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?
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.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org