private static Function<ProgressIndicator, List<OrderRoot>> newOrderRootResolveJob(@NotNull JpsMavenRepositoryLibraryDescriptor desc,
                                                                                     @NotNull Set<ArtifactKind> kinds,
                                                                                     @NotNull Collection<RemoteRepositoryDescription> repositories,
                                                                                     @Nullable String copyTo) {
    return new LibraryResolveJob(desc, kinds, repositories).andThen(
      resolved -> resolved.isEmpty() ? Collections.emptyList() : copyAndRefreshFiles(resolved, copyTo));
  }
private static Function<ProgressIndicator, List<OrderRoot>> newOrderRootResolveJob(@NotNull JpsMavenRepositoryLibraryDescriptor desc,
                                                                                     @NotNull Set<ArtifactKind> kinds,
                                                                                     @NotNull Collection<RemoteRepositoryDescription> repositories,
                                                                                     @Nullable String copyTo)