On Mon, Jul 2, 2012 at 10:03 PM, Olivier Lamy <[email protected]> wrote: > 2012/7/1 Thomas Broyer <[email protected]>: >> 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: [email protected] For additional commands, e-mail: [email protected]
