@Override
  public Promise<Result> run(@NotNull Project project, @NotNull ProjectTaskContext context, ProjectTask @NotNull ... tasks) {
    AsyncPromise<Result> promise = new AsyncPromise<>();
    Tracer.Span jpsRunnerStart = Tracer.start("jps runner");
    context.putUserData(JPS_BUILD_DATA_KEY, new MyJpsBuildData());
    if (context.isCollectionOfGeneratedFilesEnabled()) {
      SimpleMessageBusConnection fileGeneratedTopicConnection = project.getMessageBus().simpleConnect();
      fileGeneratedTopicConnection.subscribe(CompilerTopics.COMPILATION_STATUS, new CompilationStatusListener() {
        @Override
        public void fileGenerated(@NotNull String outputRoot, @NotNull String relativePath) {
          context.fileGenerated(outputRoot, relativePath);
        }
      });
      promise.onProcessed(result -> {
        fileGeneratedTopicConnection.disconnect();
      });
    }
    Map<Class<? extends ProjectTask>, List<ProjectTask>> taskMap = groupBy(Arrays.asList(tasks));
    ModalityUiUtil.invokeLaterIfNeeded(ModalityState.defaultModalityState(), project.getDisposed(), () -> {
      try (MyNotificationCollector notificationCollector = new MyNotificationCollector(context, promise)) {
        runModulesResourcesBuildTasks(project, context, notificationCollector, taskMap);
        runModulesBuildTasks(project, context, notificationCollector, taskMap);
        runFilesBuildTasks(project, notificationCollector, taskMap);
        runEmptyBuildTask(project, context, notificationCollector, taskMap);
        runArtifactsBuildTasks(project, context, notificationCollector, taskMap);
      }
    });
    jpsRunnerStart.complete();
    return promise;
  }
@Override
  public Promise<Result> run(@NotNull Project project, @NotNull ProjectTaskContext context, ProjectTask @NotNull ... tasks)