private static void onExecutionEvent(ExecutionEvent event) {
    MojoExecution mojoExec = event.getMojoExecution();
    String projectId = event.getProject() == null ? "unknown" : event.getProject().getId();
    if (mojoExec != null) {
      String errMessage = event.getException() == null ? "" : getErrorMessage(event.getException());
      printMavenEventInfo(event.getType(), "source", String.valueOf(mojoExec.getSource()), "goal", mojoExec.getGoal(), "id", projectId,
                          "error",
                          errMessage);
    }
    else {
      if (event.getType() == ExecutionEvent.Type.SessionStarted) {
        printSessionStartedEventAndReactorData(event, projectId);
      }
      else {
        printMavenEventInfo(event.getType(), "id", projectId);
      }
    }
  }
private static void onExecutionEvent(ExecutionEvent event)