try
{
File buildOutputFile = buildAgentConfigurationService.getBuildOutputFile( project.getId() );
getLogger().debug( "Start building of project " + project.getId() );
ContinuumAgentBuildExecutionResult result = buildExecutor.build( project, buildDefinition, buildOutputFile,
environments, localRepository );
buildResult.setState( result.getExitCode() == 0 ? ContinuumProjectState.OK : ContinuumProjectState.FAILED );
buildResult.setExitCode( result.getExitCode() );
}
catch ( ContinuumAgentBuildCancelledException e )
{
getLogger().info( "Cancelled build" );