void (Consumer<? super BuildEvent> messageConsumer, MavenParsingContext.MavenExecutionEntry execution, String errorMessage) { if (execution == null) { MavenLog.LOG.warn("Error parsing maven log"); return; } messageConsumer .accept(new FinishEventImpl(execution.getId(), execution.getParentId(), System.currentTimeMillis(), execution.getName(), new MavenTaskFailedResultImpl(errorMessage))); execution.complete(); }