You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Bernhard Daubner <be...@uni-bayreuth.de> on 2005/11/16 23:52:50 UTC

Maven2: Call a Mojo from another Mojo

Could somebody please point me to an example where a goal from a Maven2 
Mojo is called from another Mojo? I'am especially interested in how the 
parameters are given over.

I would like to write a Maven2 Plugin that calls the Maven-SCM-Plugin to 
check out a certain revision of the source code and then calls a Metrics 
Plugin to do some measurement on the checked out sources.

Thanks in advance
Bernhard

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


Re: Maven2: Call a Mojo from another Mojo

Posted by dan tran <da...@gmail.com>.
Basically, you need to run the plugins by invoke maven again thru a command
line interface.
 Take a look at maven-release-plugin src
 There are some talk bout using maven-embedder, but i dont know how to do it
yet.
 -D

 On 11/16/05, Bernhard Daubner <be...@uni-bayreuth.de> wrote:
>
> Could somebody please point me to an example where a goal from a Maven2
> Mojo is called from another Mojo? I'am especially interested in how the
> parameters are given over.
>
> I would like to write a Maven2 Plugin that calls the Maven-SCM-Plugin to
> check out a certain revision of the source code and then calls a Metrics
> Plugin to do some measurement on the checked out sources.
>
> Thanks in advance
> Bernhard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>