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 ); }
((DefaultI18N) i18n).initialize(); } catch (InitializationException e) { e.printStackTrace(); throw new MojoExecutionException("Unable to initialize I18N object", e);
private Registry createDefaultConfigurationFile() throws RegistryException { // TODO: may not be needed under commons-configuration 1.4 - check // UPDATE: Upgrading to commons-configuration 1.4 breaks half the unit tests. 2007-10-11 (joakime) String contents = "<configuration />"; if ( !writeFile( "user configuration", userConfigFilename, contents ) ) { if ( !writeFile( "alternative configuration", altConfigFilename, contents ) ) { throw new RegistryException( "Unable to create configuration file in either user [" + userConfigFilename + "] or alternative [" + altConfigFilename + "] locations on disk, usually happens when not allowed to write to those locations." ); } } try { ( (Initializable) registry ).initialize(); for ( RegistryListener regListener : registryListeners ) { addRegistryChangeListener( regListener ); } } catch ( InitializationException e ) { throw new RegistryException( "Unable to reinitialize configuration: " + e.getMessage(), e ); } triggerEvent( ConfigurationEvent.SAVED ); return registry.getSection( KEY + ".user" ); }
public JSCompressorProxy( Object compressor ) throws InitializationException { super(); this.compressor = compressor; try { this.compress = compressor.getClass().getMethod( "compress", new Class[] { File.class, File.class, int.class, int.class } ); } catch ( Exception e ) { throw new InitializationException( "proxied object has no method compress(File,File,int,int)" ); } }
/** * @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable#initialize() */ public void initialize() throws InitializationException { try { loadFromResource( "/META-INF/npanday/registry-config.xml", this.getClass() ); } catch ( IOException e ) { throw new InitializationException( "NPANDAY-082-000: Message = ", e ); } catch ( NPandayRepositoryException e ) { throw new InitializationException( "NPANDAY-082-010: Message = ", e ); } }
public void initialize() throws InitializationException { try { dispatcher = (DefaultSecDispatcher) plexusContainer.lookup( SecDispatcher.class, "maven" ); } catch ( ComponentLookupException e ) { throw new InitializationException( e.getMessage(), e ); } }
public void initialize() throws InitializationException { try { dispatcher = (DefaultSecDispatcher) plexusContainer.lookup( SecDispatcher.class, "maven" ); } catch ( ComponentLookupException e ) { throw new InitializationException( e.getMessage(), e ); } }
private void configureEncoder() throws InitializationException { String encoder = config.getString( PASSWORD_ENCODER ); if ( encoder != null ) { try { this.passwordEncoder = (PasswordEncoder) plexus.lookup( PasswordEncoder.ROLE, encoder ); } catch ( ComponentLookupException e ) { throw new InitializationException( "Unable to lookup password encoder.", e ); } } }
/** * Initialize this tool once it's been instantiated and composed, in order to start up the * MavenInvoker instance. */ public void initialize() throws InitializationException { try { startInvoker(); } catch ( IOException e ) { throw new InitializationException( "Error detecting maven home.", e ); } }
public void initialize() throws InitializationException { try { dispatcher = (DefaultSecDispatcher) plexusContainer.lookup( SecDispatcher.class, "maven" ); eventSpyDispatcher = plexusContainer.lookup( EventSpyDispatcher.class ); modelProcessor = plexusContainer.lookup( ModelProcessor.class ); executionRequestPopulator = plexusContainer.lookup( MavenExecutionRequestPopulator.class ); settingsBuilder = plexusContainer.lookup( SettingsBuilder.class ); } catch ( ComponentLookupException e ) { throw new InitializationException( e.getMessage(), e ); } }
/** * Initialize this tool once it's been instantiated and composed, in order to start up the * MavenInvoker instance. * * @throws InitializationException if any */ public void initialize() throws InitializationException { try { startInvoker(); } catch ( IOException e ) { throw new InitializationException( "Error detecting maven home.", e ); } }
public void initialize() throws InitializationException { try { Settings settings = getSettings(); resolveParameters( settings ); } catch ( Exception e ) { throw new InitializationException( "Can't initialize '" + getClass().getName() + "'", e ); } }
public void initialize() throws InitializationException { try { Settings settings = getSettings(); resolveParameters( settings ); } catch ( Exception e ) { throw new InitializationException( "Can't initialize '" + getClass().getName() + "'", e ); } }
public void initialize() throws InitializationException { try { Settings settings = getSettings(); resolveParameters( settings ); } catch ( Exception e ) { throw new InitializationException( "Can't initialize '" + getClass().getName() + "'", e ); } } }
public void initialize() throws InitializationException { try { initializeDefaultContinuumBuildDefintions(); } catch ( BuildDefinitionServiceException e ) { throw new InitializationException( e.getMessage(), e ); } }
public void initialize() throws InitializationException { try { initializeDefaultContinuumBuildDefintions(); } catch ( BuildDefinitionServiceException e ) { throw new InitializationException( e.getMessage(), e ); } }
public void initialize() throws InitializationException { try { this.scheduler.submit(getAction(), this); } catch (Exception e) { throw new InitializationException( "Couldn't calculate artifact usage while initializing server", e); } }
public void initialize() throws InitializationException { try { SchedulerFactory factory = new StdSchedulerFactory( properties ); scheduler = (StdScheduler) factory.getScheduler(); } catch ( SchedulerException e ) { throw new InitializationException( "Cannot create scheduler.", e ); } }
public void initialize() throws InitializationException { try { SchedulerFactory factory = new StdSchedulerFactory( properties ); scheduler = (StdScheduler) factory.getScheduler(); } catch ( SchedulerException e ) { throw new InitializationException( "Cannot create scheduler.", e ); } }
public void initialize() throws InitializationException { registerWithEventBus(); try { initializeConfiguration(); } catch ( ConfigurationException e ) { throw new InitializationException( "Cannot configure the component!", e ); } }