put("mavenEnvOpts", configuration.getMavenEnvOpts()).
put("mavenArgs", configuration.getMavenArgs()).
put("mavenBuildArgs", configuration.getMavenBuildArgs()).
put("mavenTestArgs", configuration.getMavenTestArgs());
final ImmutableMap<String, String> templateDefaults = templateDefaultsBuilder.build();
TestParser testParser = new TestParser(configuration.getContext(), configuration.getTestCasePropertyName(),
new File(mExecutionContext.getLocalWorkingDirectory(), configuration.getRepositoryName() + "-source"),
logger);
HostExecutorBuilder hostExecutorBuilder = new HostExecutorBuilder() {
@Override
public HostExecutor build(Host host) {
return new HostExecutor(host, executionContext.getPrivateKey(), mExecutor, sshCommandExecutor,
rsyncCommandExecutor, templateDefaults, scratchDir, succeededLogDir, failedLogDir, 10, logger);
}
};
List<HostExecutor> hostExecutors = new ArrayList<HostExecutor>();
for(Host host : mExecutionContext.getHosts()) {
hostExecutors.add(hostExecutorBuilder.build(host));
}
mHostExecutors = new CopyOnWriteArrayList<HostExecutor>(hostExecutors);
mPhases = Lists.newArrayList();
mPhases.add(new PrepPhase(mHostExecutors, localCommandFactory, templateDefaults, scratchDir, patchFile, logger));
mPhases.add(new ExecutionPhase(mHostExecutors, mExecutionContext, hostExecutorBuilder, localCommandFactory, templateDefaults,
succeededLogDir, failedLogDir, testParser.parse(), mExecutedTests, mFailedTests, logger));
mPhases.add(new ReportingPhase(mHostExecutors, localCommandFactory, templateDefaults, logger));
}