@NotNull
  private List<MavenArtifact> doResolveTransitivelyWithError(@NotNull List<MavenArtifactInfo> artifacts,
                                                             @NotNull List<MavenRemoteRepository> remoteRepositories)
    throws ArtifactResolutionException, ArtifactNotFoundException {
    Set<Artifact> toResolve = new LinkedHashSet<>();
    for (MavenArtifactInfo each : artifacts) {
      toResolve.add(createArtifact(each));
    }

    Artifact project = getComponent(ArtifactFactory.class).createBuildArtifact("temp", "temp", "666", "pom");

    Set<Artifact> res = getComponent(ArtifactResolver.class)
      .resolveTransitively(toResolve, project, Collections.emptyMap(), myLocalRepository, convertRepositories(remoteRepositories),
                           getComponent(ArtifactMetadataSource.class)).getArtifacts();

    return Maven3ModelConverter.convertArtifacts(res, new HashMap<>(), getLocalRepositoryFile());
  }
@NotNull
  private List<MavenArtifact> doResolveTransitivelyWithError(@NotNull List<MavenArtifactInfo> artifacts,
                                                             @NotNull List<MavenRemoteRepository> remoteRepositories)