ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();
ReactorBuildStatus reactorBuildStatus = new ReactorBuildStatus( session.getProjectDependencyGraph() );
reactorContext = new ReactorContext( result, projectIndex, oldContextClassLoader, reactorBuildStatus );
String builderId = session.getRequest().getBuilderId();
Builder builder = builders.get( builderId );
if ( builder == null )
{
throw new BuilderNotFoundException( String.format( "The builder requested using id = %s cannot be found", builderId ) );
}
int degreeOfConcurrency = session.getRequest().getDegreeOfConcurrency();
if ( degreeOfConcurrency >= 2 )
{
logger.info( "" );
logger.info( String.format( "Using the %s implementation with a thread count of %d", builder.getClass().getSimpleName(), degreeOfConcurrency ) );
}
builder.build( session, reactorContext, projectBuilds, taskSegments, reactorBuildStatus );
}
catch ( Exception e )
{
result.addException( e );