You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kay Kay <ka...@gmail.com> on 2010/01/30 19:48:42 UTC

How to have a mojo goal dependent on compile goal

I have defined a class inheriting from AbstractMojo with @goal mygoal.

So, everytime  we do

$ mvn myplugin:mygoal

I want to invoke the compile goal ( $ mvn compile ) behind the scenes 
and my goal getting launched only if the former was a success. Is there 
an annotation / configuration in pom.xml of my maven plugin to do this.


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


Re: How to have a mojo goal dependent on compile goal

Posted by Kay Kay <ka...@gmail.com>.
Adding this to the mojo on top, works. Thanks.


  * @execute phase="compile"


On 01/30/2010 11:06 AM, Justin Edelson wrote:
> Please read the @execute descriptor documention on this page: 
> http://maven.apache.org/developers/mojo-api-specification.html
>
> Justin
>
> On 1/30/10 1:48 PM, Kay Kay wrote:
>> I have defined a class inheriting from AbstractMojo with @goal mygoal.
>>
>> So, everytime  we do
>>
>> $ mvn myplugin:mygoal
>>
>> I want to invoke the compile goal ( $ mvn compile ) behind the scenes 
>> and my goal getting launched only if the former was a success. Is 
>> there an annotation / configuration in pom.xml of my maven plugin to 
>> do this.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: How to have a mojo goal dependent on compile goal

Posted by Justin Edelson <ju...@gmail.com>.
Please read the @execute descriptor documention on this page: 
http://maven.apache.org/developers/mojo-api-specification.html

Justin

On 1/30/10 1:48 PM, Kay Kay wrote:
> I have defined a class inheriting from AbstractMojo with @goal mygoal.
>
> So, everytime  we do
>
> $ mvn myplugin:mygoal
>
> I want to invoke the compile goal ( $ mvn compile ) behind the scenes 
> and my goal getting launched only if the former was a success. Is 
> there an annotation / configuration in pom.xml of my maven plugin to 
> do this.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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