void (Consumer<? super BuildEvent> messageConsumer, MavenParsingContext context) { context.setSessionEnded(true); if (context.getProjectFailure()) { messageConsumer .accept(new FinishBuildEventImpl(context.getMyTaskId(), null, System.currentTimeMillis(), "", new FailureResultImpl())); } else { messageConsumer .accept(new FinishBuildEventImpl(context.getMyTaskId(), null, System.currentTimeMillis(), "", new SuccessResultImpl())); } }