[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[tycho-dev] Invoke maven project extension before TychoMavenLifecycleParticipant - patch question
|
- From: Tom Bujok <tom.bujok@xxxxxxxxx>
- Date: Wed, 7 Mar 2012 08:36:01 +0100
- Delivered-to: tycho-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=3mWIJYmbrihWpFa9NBtd1BJeSFWS5hYzwIsJ3K/s5WM=; b=b975j5CR2Welr80MskoW044wULw0a25sHyA3pXrCj/tfnSjlYs1JaGdPfWaCy5qE+w NMDOg4PApDJJpooyNF5+voqclq6AC6QF+nneaKvQxuGuKzcI1iiYzFrwMPHYXX92DVIM xmyKyI5MJuwNn2LT2EZdJidykCIBnKebiKcBVB2Pi6PbXHwvYf3CftDaqMVWiyynXs7q Wl/+DpVCGEPqobcBwIbMa2t0vAG2WIsXJkgd63ilQfF913uVHPsuX18aEKDDnL9NOUpd jRhemSVqHE5rpNRmMckb70qbZvd0jGf6sexTSvSutojhzq4g0uWNVP7lnomFJosDs5Ok AFFA==
Hi guys,
In this thread I described why it is impossible to invoke any processing logic before TychoMavenLifecycleParticipant:
http://dev.eclipse.org/mhonarc/lists/tycho-user/msg02103.html
It is also connected to this problem: http://www.mail-archive.com/users@xxxxxxxxxxxxxxxx/msg123753.html
Such limitation breaks the maven processing principle - since normally the order of plugins' in the pom.xml file defines in which order they are executed. Right now with tycho - there is now way to invoke anything before the tycho project setup finishes. In order to add some more flexibility to a tycho build I think it would be perfect if there was some kind of a callback mechanism included in the TychoMavenLifecycleParticipant.
let's say that we could have such interface:
public interface TychoLifecycleParticipant {
void beforeProjectSetup(MavenSession session);
void afterProjectSetup(MavenSession session);
}
and then in the TychoMavenLifecycleParticipant we could add:
public class TychoMavenLifecycleParticipant extends AbstractMavenLifecycleParticipant {
@Override
public void afterProjectsRead(MavenSession session) throws MavenExecutionException {
Collection<TychoLifecycleParticipant> tychoParticipants = plexus.lookupList(TychoMavenLifecycleParticipant.class);
for (TychoLifecycleParticipant p : tychoParticipants) {
p. beforeProjectSetup(session);
}
(…)
for (TychoLifecycleParticipant p : tychoParticipants) {
p. afterProjectSetup(session);
}
}
}
Do you agree with that and would you accept such patch?
Cheers,
Tom Bujok