@Override
  public boolean executeTask(@NotNull final DataContext context,
                             @NotNull RunConfiguration configuration,
                             @NotNull ExecutionEnvironment env,
                             @NotNull final MavenBeforeRunTask task) {
    ApplicationManager.getApplication().invokeAndWait(() -> FileDocumentManager.getInstance().saveAllDocuments());

    final Project project = CommonDataKeys.PROJECT.getData(context);

    if (ReadAction.compute(() -> project == null || project.isDisposed())) return false;

    return doRunMavenTask(project, task, env);
  }
@Override
  public boolean executeTask(@NotNull final DataContext context,
                             @NotNull RunConfiguration configuration,
                             @NotNull ExecutionEnvironment env,
                             @NotNull final MavenBeforeRunTask task)