@NotNull
  private ArrayList<MavenArtifact> doResolveArtifacts(@NotNull LongRunningTask task,
                                                      @NotNull Collection<MavenArtifactResolutionRequest> requests) {
    try {
      ArrayList<MavenArtifact> artifacts = new ArrayList<>();
      for (MavenArtifactResolutionRequest request : requests) {
        if (task.isCanceled()) break;
        MavenArtifact artifact = doResolveArtifact(request.getArtifactInfo(), request.getRemoteRepositories(), task.getIndicator());
        artifacts.add(artifact);
        task.incrementFinishedRequests();
      }
      return artifacts;
    }
    catch (Exception e) {
      throw wrapToSerializableRuntimeException(e);
    }
  }
@NotNull
  private ArrayList<MavenArtifact> doResolveArtifacts(@NotNull LongRunningTask task,
                                                      @NotNull Collection<MavenArtifactResolutionRequest> requests)