Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Invoke a participant before TychoMavenLifecycleParticipant - is it possible?


Thanks for your answer Bernd. My plugin is defined above tycho in the pom, but with LifecycleParticipants it doesn't work that way.
The mechanism relies on the Plexus container since maven invokes: plexusContainer.lookupList( AbstractMavenLifecycleParticipant.class ) - the order in which the method returns objects is not guaranteed…

The second option would do the trick, but I want the project to be self-contained - the requirements to copy jars into maven ext is unfortunately unacceptable for me.

I was thinking of extending tycho and adding some kind of a listener invocation at the beginning and at the end of the TychoLifecycleParticipant method - otherwise the maven principle of ordering processing steps is broken when you use tycho. Would you accept a patch? Or maybe I should ask it a tycho-dev list?

Thanks anyway,

On Mar 6, 2012, at 11:25 AM, Bernd Vogt wrote:


try to declare your plugin/extension above the tycho plugin in your pom... first come first serve... at least this applies to the execution order of plugins...

Another way is to devlop a "Maven Core Extension" and but it under ${maven.home}/lib/ext/ (since Maven 3.0.3). If you do so, the AbstractMavenLifecycleParticipant#afterSessionStart(...) method will be invoked beside #afterProjectsRead(...) also. And both methods will be invoked before the TychoMavenLifecycleParticipant methods.


2012/3/6 Tom Bujok <tom.bujok@xxxxxxxxx>
Hi guys,

I am writing a maven plugin to customize my tycho build a bit.
The tricky part is that my plugin has to be invoked before any tycho plugin. I checked that you guys use the TychoMavenLifecycleParticipant to do all your project configuration before any other plugin is invoked.
Whenever I register my own AbstractMavenLifecycleParticipants it is invoked after the tycho's participant. Is there a way to hook-in at an earlier stage or use some plexus trickery to order the participants -  to make sure that my participant is invoked before any other participant?

Thanks in advance,
Tom Bujok

tycho-user mailing list

tycho-user mailing list

Back to the top