Skip to content

Commit

Permalink
FORGE-2253: Fallback to central if no mirrors are set
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Feb 19, 2015
1 parent d5143f5 commit 1fa1505
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -30,9 +30,10 @@ public static List<RemoteRepository> getRemoteRepositories(MavenContainer contai
{
Set<RemoteRepository> remoteRepos = new HashSet<>();
remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings));
if (remoteRepos.isEmpty())
// If no remote repositories found or no mirrors found, add central
if (remoteRepos.isEmpty() || settings.getMirrors().isEmpty())
{
// Add central in case remote repo list is empty
// Add central
remoteRepos.add(convertToMavenRepo("central", MAVEN_CENTRAL_REPO, settings));
}
return new ArrayList<>(remoteRepos);
Expand Down

0 comments on commit 1fa1505

Please sign in to comment.