try
{
fis = new FileInputStream( file );
ContinuumBuildAgentConfigurationModelXpp3Reader configurationXpp3Reader =
new ContinuumBuildAgentConfigurationModelXpp3Reader();
ContinuumBuildAgentConfigurationModel configuration = configurationXpp3Reader.read( new InputStreamReader(
fis ) );
this.generalBuildAgentConfiguration = new GeneralBuildAgentConfiguration();
if ( StringUtils.isNotEmpty( configuration.getBuildOutputDirectory() ) )
{
this.generalBuildAgentConfiguration.setBuildOutputDirectory( new File(
configuration.getBuildOutputDirectory() ) );
}
if ( StringUtils.isNotEmpty( configuration.getWorkingDirectory() ) )
{
this.generalBuildAgentConfiguration.setWorkingDirectory( new File(
configuration.getWorkingDirectory() ) );
}
this.generalBuildAgentConfiguration.setContinuumServerUrl( configuration.getContinuumServerUrl() );
this.generalBuildAgentConfiguration.setInstallations( configuration.getInstallations() );
this.generalBuildAgentConfiguration.setLocalRepositories( configuration.getLocalRepositories() );
this.generalBuildAgentConfiguration.setSharedSecretPassword( configuration.getSharedSecretPassword() );
}
catch ( IOException e )
{
log.error( e.getMessage(), e );
throw new BuildAgentConfigurationException( e.getMessage(), e );