You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Broyer <t....@gmail.com> on 2012/07/01 17:26:49 UTC

Mojo @execute with both phase and goal

Hi all,

Let's say I have a mojo that requires both a phase (process-classes)
and a goal (war:exploded) to be executed before it itself is run, am I
right to think that I should create a new custom lifecycle that binds
the war:exploded goal to some phase after process-classes, copying the
previous phases from the war packaging lifecycle and declaring
@execute phase=some-phase lifecycle=my-lifecycle?

I found out about the mojo-executor project; would it be wise to use
it instead? (declare @execute phase=process-classes and then use the
mojo-executor component to run the war:exploded goal)

Am I on the right track? What would be the best practice?

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

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


Re: Mojo @execute with both phase and goal

Posted by Thomas Broyer <t....@gmail.com>.
Le 3 juil. 2012 16:42, "Olivier Lamy" <ol...@apache.org> a écrit :
>
> 2012/7/3 Wayne Fay <wa...@gmail.com>:
> >>> Am I on the right track? What would be the best practice?
> >> Perso I would use the lifecycle approach which is more IMFO in the
> >> maven supported approach.
> >
> > Is that your "frank" opinion or hmmmm... Didn't know you felt so
> > strongly about it, Olivier. ;-)
> hehe
> F can have some significations :-)

"French" I guess ;-)

Re: Mojo @execute with both phase and goal

Posted by Olivier Lamy <ol...@apache.org>.
2012/7/3 Wayne Fay <wa...@gmail.com>:
>>> Am I on the right track? What would be the best practice?
>> Perso I would use the lifecycle approach which is more IMFO in the
>> maven supported approach.
>
> Is that your "frank" opinion or hmmmm... Didn't know you felt so
> strongly about it, Olivier. ;-)
hehe
F can have some significations :-)
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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


Re: Mojo @execute with both phase and goal

Posted by Wayne Fay <wa...@gmail.com>.
>> Am I on the right track? What would be the best practice?
> Perso I would use the lifecycle approach which is more IMFO in the
> maven supported approach.

Is that your "frank" opinion or hmmmm... Didn't know you felt so
strongly about it, Olivier. ;-)

Wayne

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


Re: Mojo @execute with both phase and goal

Posted by Thomas Broyer <t....@gmail.com>.
On Mon, Jul 2, 2012 at 10:03 PM, Olivier Lamy <ol...@apache.org> wrote:
> 2012/7/1 Thomas Broyer <t....@gmail.com>:
>> Hi all,
>>
>> Let's say I have a mojo that requires both a phase (process-classes)
>> and a goal (war:exploded) to be executed before it itself is run, am I
>> right to think that I should create a new custom lifecycle that binds
>> the war:exploded goal to some phase after process-classes, copying the
>> previous phases from the war packaging lifecycle and declaring
>> @execute phase=some-phase lifecycle=my-lifecycle?
> Correct that should work.
>>
>> I found out about the mojo-executor project; would it be wise to use
>> it instead? (declare @execute phase=process-classes and then use the
>> mojo-executor component to run the war:exploded goal)
>
> Long time ago I checked and that didn't work with mvn3 (maybe now it's
> fixed: frankly no idea on that)

It's been updated for Maven 3: http://timmoore.github.com/mojo-executor/

>> Am I on the right track? What would be the best practice?
> Perso I would use the lifecycle approach which is more IMFO in the
> maven supported approach.

Thanks Olivier, I'll try that then.
You guess which project and possibly which mojo I was talking about? ;-)

(BTW, I started trying mojo-executor but it causes issues elsewhere /
namely in tests when initializing the plexus container; I'm not the
author of those tests and I'm not sure I understand them, and I didn't
investigate the cause of the error).

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

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


Re: Mojo @execute with both phase and goal

Posted by Olivier Lamy <ol...@apache.org>.
2012/7/1 Thomas Broyer <t....@gmail.com>:
> Hi all,
>
> Let's say I have a mojo that requires both a phase (process-classes)
> and a goal (war:exploded) to be executed before it itself is run, am I
> right to think that I should create a new custom lifecycle that binds
> the war:exploded goal to some phase after process-classes, copying the
> previous phases from the war packaging lifecycle and declaring
> @execute phase=some-phase lifecycle=my-lifecycle?
Correct that should work.
>
> I found out about the mojo-executor project; would it be wise to use
> it instead? (declare @execute phase=process-classes and then use the
> mojo-executor component to run the war:exploded goal)

Long time ago I checked and that didn't work with mvn3 (maybe now it's
fixed: frankly no idea on that)

>
> Am I on the right track? What would be the best practice?
Perso I would use the lifecycle approach which is more IMFO in the
maven supported approach.
>
> --
> Thomas Broyer
> /tɔ.ma.bʁwa.je/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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