public void write( File target, ClassworldsAppConfiguration config, File velocityProperties ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { Velocity.init( velocityProperties.getAbsolutePath() ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, null, engine ); }
private File writeClassworlds( String rawClassPath ) { ClassworldsRealmConfiguration rootRealmConfig = new ClassworldsRealmConfiguration( "wagon" ); rootRealmConfig.addLoadPatterns( Arrays.asList( rawClassPath.split( File.pathSeparator ) ) ); ClassworldsAppConfiguration config = new ClassworldsAppConfiguration(); config.setMainClass( WagonDeployer.class.toString() ); config.addRealmConfiguration( rootRealmConfig ); config.setMainRealm( rootRealmConfig.getRealmId() ); ClassworldsValidationResult vr = new ClassworldsModelValidator().validate( config ); if ( vr.hasErrors() ) { throw new RuntimeException( vr.render() ); } File classworldsConf = new File( "target/wagonDeploy/", "classworlds.conf" ); classworldsConf.getParentFile().mkdirs(); try { new ClassworldsConfWriter().write( classworldsConf, config ); } catch ( ClassworldsIOException e ) { throw new RuntimeException( e.getMessage(), e ); } return classworldsConf; }
private File writeConfig( ClassworldsAppConfiguration config ) throws AppBooterServiceException { File classworldsConf = new File( tempDir, "classworlds.conf" ); try { ClassworldsConfWriter writer = new ClassworldsConfWriter(); Properties velocityProperties = writer.getDefaultVelocityProperties(); VelocityLogChute.setPlexusLogger( getLogger() ); velocityProperties.setProperty( "runtime.log.logsystem.class", VelocityLogChute.class.getName() ); writer.write( classworldsConf, config, velocityProperties ); getLogger().info( "Wrote classworlds.conf to: " + classworldsConf ); } catch ( ClassworldsIOException e ) { throw new AppBooterServiceException( e.getMessage(), e ); } if ( outputDebugMessages() ) { getLogger().info( "Saving Classworlds configuration at: " + classworldsConf.getAbsolutePath() ); } return classworldsConf; }
public void write( File target, ClassworldsAppConfiguration config, Properties velocityProperties ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { checkLogChute( velocityProperties ); engine.init( velocityProperties ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, null, engine ); }
private File writeConfig( ClassworldsAppConfiguration config ) throws AppBooterServiceException { File classworldsConf = new File( tempDir, "classworlds.conf" ); try { ClassworldsConfWriter writer = new ClassworldsConfWriter(); Properties velocityProperties = writer.getDefaultVelocityProperties(); VelocityLogChute.setPlexusLogger( getLogger() ); velocityProperties.setProperty( "runtime.log.logsystem.class", VelocityLogChute.class.getName() ); writer.write( classworldsConf, config, velocityProperties ); getLogger().info( "Wrote classworlds.conf to: " + classworldsConf ); } catch ( ClassworldsIOException e ) { throw new AppBooterServiceException( e.getMessage(), e ); } if ( outputDebugMessages() ) { getLogger().info( "Saving Classworlds configuration at: " + classworldsConf.getAbsolutePath() ); } return classworldsConf; }
public void write( File target, ClassworldsAppConfiguration config, File velocityProperties ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { Velocity.init( velocityProperties.getAbsolutePath() ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, null, engine ); }
public void write( File target, ClassworldsAppConfiguration config, Properties velocityProperties, Map<String, Object> context ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { checkLogChute( velocityProperties ); engine.init( velocityProperties ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, context, engine ); }
public void write( File target, ClassworldsAppConfiguration config, File velocityProperties ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { Velocity.init( velocityProperties.getAbsolutePath() ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, null, engine ); }
public void write( File target, ClassworldsAppConfiguration config, Properties velocityProperties ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { checkLogChute( velocityProperties ); engine.init( velocityProperties ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, null, engine ); }
public void write( File target, ClassworldsAppConfiguration config, Properties velocityProperties ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { checkLogChute( velocityProperties ); engine.init( velocityProperties ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, null, engine ); }
public void write( File target, ClassworldsAppConfiguration config, Properties velocityProperties, Map<String, Object> context ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { checkLogChute( velocityProperties ); engine.init( velocityProperties ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, context, engine ); }
public void write( File target, ClassworldsAppConfiguration config, Properties velocityProperties, Map<String, Object> context ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { checkLogChute( velocityProperties ); engine.init( velocityProperties ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, context, engine ); }
throw new ClassworldsIOException( "Cannot find " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error reading " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error loading " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error writing classworlds application config to: " + target, e );
throw new ClassworldsIOException( "Cannot find " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error reading " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error loading " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error writing classworlds application config to: " + target, e );
throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e );
throw new ClassworldsIOException( "Cannot find " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error reading " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error loading " + CLASSWORLDS_CONF_TEMPLATE + " template: " + e.getMessage(), e ); throw new ClassworldsIOException( "Error writing classworlds application config to: " + target, e );
public void write( File target, ClassworldsAppConfiguration config ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { Properties props = getDefaultVelocityProperties(); checkLogChute( props ); engine.init( props ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, null, engine ); }
throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e );
throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e );
public void write( File target, ClassworldsAppConfiguration config, Map<String, Object> context ) throws ClassworldsIOException { VelocityEngine engine = new VelocityEngine(); try { Properties props = getDefaultVelocityProperties(); checkLogChute( props ); engine.init( props ); } catch ( Exception e ) { throw new ClassworldsIOException( "Error initializing Velocity: " + e.getMessage(), e ); } _write( target, config, context, engine ); }