public void initialize() throws InitializationException { String mavenVersion = rtInfo.getMavenVersion(); if ( StringUtils.isEmpty( mavenVersion ) ) { throw new InitializationException( "Unable to read Maven version from maven-core" ); } applicationVersion = new DefaultArtifactVersion( mavenVersion ); }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Suspendable ) { ( (Suspendable) object ).resume(); } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Disposable ) { ( (Disposable) object ).dispose(); } } }
plexus.addBeginSegment( new LogEnablePhase() ); plexus.addBeginSegment( new ContextualizePhase() ); plexus.addBeginSegment( new InitializePhase() ); plexus.addBeginSegment( new StartPhase() ); plexus.addEndSegment( new StopPhase() ); plexus.addEndSegment( new DisposePhase() ); plexus.addEndSegment( new LogDisablePhase() ); lifecycleHandlerManager.addLifecycleHandler( plexus ); basic.addBeginSegment( new LogEnablePhase() ); basic.addBeginSegment( new ContextualizePhase() ); basic.addBeginSegment( new InitializePhase() ); basic.addBeginSegment( new StartPhase() ); basic.addEndSegment( new StopPhase() ); basic.addEndSegment( new DisposePhase() ); basic.addEndSegment( new LogDisablePhase() ); lifecycleHandlerManager.addLifecycleHandler( basic ); plexusConfigurable.addBeginSegment( new LogEnablePhase() ); plexusConfigurable.addBeginSegment( new ContextualizePhase() ); plexusConfigurable.addBeginSegment( new ConfigurablePhase() ); plexusConfigurable.addBeginSegment( new InitializePhase() ); plexusConfigurable.addBeginSegment( new StartPhase() ); plexusConfigurable.addEndSegment( new StopPhase() );
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Initializable ) { try { ( (Initializable) object ).initialize(); } catch ( InitializationException e ) { throw new PhaseExecutionException( "Error initialising component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).start(); } catch ( StartingException e ) { throw new PhaseExecutionException( "Error starting component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).stop(); } catch ( StoppingException e ) { throw new PhaseExecutionException( "Error stopping component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Contextualizable ) { Context context = manager.getContainer().getContext(); ClassRealm origRealm = manager.getContainer().setLookupRealm( lookupRealm ); try { ( (Contextualizable) object ).contextualize( context ); } catch ( ContextException e ) { throw new PhaseExecutionException( "Unable to contextualize component", e ); } finally { manager.getContainer().setLookupRealm( origRealm ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Configurable ) { try { ( (Configurable) object ).configure( manager.getComponentDescriptor().getConfiguration() ); } catch ( PlexusConfigurationException e ) { throw new PhaseExecutionException( "Error occurred during phase execution", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Serviceable ) { PlexusContainer container = manager.getContainer(); ( (Serviceable) object ).service( new PlexusContainerLocator(container) ); } } }
public void initializeCoreComponent( ContainerInitializationContext context ) throws ContainerInitializationException { ComponentFactoryManager componentFactoryManager = context.getContainerConfiguration().getComponentFactoryManager(); if ( componentFactoryManager instanceof Contextualizable ) { //TODO: this is wrong here jvz. context.getContainer().getContext().put( PlexusConstants.PLEXUS_KEY, context.getContainer() ); try { ( (Contextualizable) componentFactoryManager).contextualize( context.getContainer().getContext() ); } catch ( ContextException e ) { throw new ContainerInitializationException( "Error contextualization component factory manager.", e ); } } context.getContainer().setComponentFactoryManager( componentFactoryManager ); } }
throw new PhaseExecutionException( "Unable to auto-configure component as its configurator could not be found", e ); throw new PhaseExecutionException( "Unable to auto-configure component", e );
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Suspendable ) { ( (Suspendable) object ).suspend(); } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Initializable ) { try { ( (Initializable) object ).initialize(); } catch ( InitializationException e ) { throw new PhaseExecutionException( "Error initialising component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).start(); } catch ( StartingException e ) { throw new PhaseExecutionException( "Error starting component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) throws PhaseExecutionException { if ( object instanceof Startable ) { try { ( (Startable) object ).stop(); } catch ( StoppingException e ) { throw new PhaseExecutionException( "Error stopping component", e ); } } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Serviceable ) { PlexusContainer container = manager.getContainer(); ( (Serviceable) object ).service( new PlexusContainerLocator(container) ); } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Disposable ) { ( (Disposable) object ).dispose(); } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Suspendable ) { ( (Suspendable) object ).resume(); } } }
public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm ) { if ( object instanceof Suspendable ) { ( (Suspendable) object ).suspend(); } } }