List of usage examples for org.apache.maven.execution AbstractExecutionListener AbstractExecutionListener
AbstractExecutionListener
From source file:org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.java
License:Open Source License
private void registerExecutionListener(MavenSession session) { MavenExecutionRequest request = session.getRequest(); ChainedExecutionListener listener = new ChainedExecutionListener(request.getExecutionListener()); listener.addListener(new AbstractExecutionListener() { @Override/*from w w w . j av a 2 s. com*/ public void sessionEnded(ExecutionEvent event) { try { EquinoxServiceFactory equinoxServiceFactory = plexus.lookup(EquinoxServiceFactory.class); if (equinoxServiceFactory != null) { plexus.release(equinoxServiceFactory); } } catch (ComponentLifecycleException e) { // we tried } catch (ComponentLookupException e) { // we tried } } }); request.setExecutionListener(listener); }
From source file:org.sourcepit.common.maven.testing.ChainedExecutionListener.java
License:Apache License
public ChainedExecutionListener(ExecutionListener next) { this.next = next == null ? new AbstractExecutionListener() { } : next; }