static List<RemoteRepositoryDescription> selectRemoteRepositories(@NotNull Project project,
                                                                    @Nullable JpsMavenRepositoryLibraryDescriptor desc,
                                                                    @Nullable Collection<RemoteRepositoryDescription> repositories) {
    if (repositories != null && !repositories.isEmpty()) {
      return repositories.stream().toList();
    }

    RemoteRepositoryDescription repositoryFromDescriptor = getRemoteRepositoryFromLibrary(project, desc);
    if (repositoryFromDescriptor != null) {
      return List.of(repositoryFromDescriptor);
    }

    return RemoteRepositoriesConfiguration.getInstance(project).getRepositories();
  }
static List<RemoteRepositoryDescription> selectRemoteRepositories(@NotNull Project project,
                                                                    @Nullable JpsMavenRepositoryLibraryDescriptor desc,
                                                                    @Nullable Collection<RemoteRepositoryDescription> repositories)