@Override
protected ExecutionResult doRun() {
OutputListenerImpl outputListener = new OutputListenerImpl();
OutputListenerImpl errorListener = new OutputListenerImpl();
BuildListenerImpl buildListener = new BuildListenerImpl();
BuildResult result = doRun(outputListener, errorListener, buildListener);
try {
result.rethrowFailure();
} catch (Exception e) {
throw new UnexpectedBuildFailure(e);
}
return assertResult(new InProcessExecutionResult(buildListener.executedTasks, buildListener.skippedTasks,
new OutputScrapingExecutionResult(outputListener.toString(), errorListener.toString())));