class MultipleOutputHandler implements MavenInvocationOutputHandler<MultipleOutputHandler, Map<Class<? extends MavenInvocationOutputHandler>, Object>> {

    @Override
    public Map<Class<? extends MavenInvocationOutputHandler>, Object> getResult() {
        if (!executionStarted) {
            throw new IllegalStateException("Execution has not started. No results to return.");
        }

        Map<Class<? extends MavenInvocationOutputHandler>, Object> results = new HashMap<Class<? extends MavenInvocationOutputHandler>, Object>();

        for (MavenInvocationOutputHandler handler : handlers) {
            if (!failedHandlers.containsKey(handler)) {
                results.put(handler.getClass(), handler.getResult());
            } else {
                results.put(handler.getClass(), failedHandlers.get(handler));
            }
        }

        return results;
    }

}