public static List<RemoteRepository> getRemoteRepositories(MavenContainer container, Settings settings) { Set<RemoteRepository> remoteRepos = new HashSet<>(); remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings)); // central repository is added if there is no central mirror String centralRepoURL = getCentralMirrorURL(settings).orElse(MAVEN_CENTRAL_REPO); remoteRepos.add(convertToMavenRepo("central", centralRepoURL, settings)); return new ArrayList<>(remoteRepos); }