ArrayList<MavenArtifact> (@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()); artifacts.add(artifact); task.incrementFinishedRequests(); } return artifacts; } catch (Exception e) { throw wrapToSerializableRuntimeException(e); } }