// simple remove operation on the enhancedRepos Collection
enhancedRepos.removeAll(reposToRemove);
}
// use mirrors if any to do the mirroring stuff
DefaultMirrorSelector dms = new DefaultMirrorSelector();
// fill in mirrors
for (Mirror mirror : settings.getMirrors()) {
// Repository manager flag is set to false
// Maven does not support specifying it in the settings.xml
dms.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
mirror.getMirrorOfLayouts());
}
Set<RemoteRepository> mirroredRepos = new LinkedHashSet<RemoteRepository>();
for (RemoteRepository repository : enhancedRepos) {
RemoteRepository mirror = dms.getMirror(repository);
if (mirror != null) {
mirroredRepos.add(mirror);
} else {
mirroredRepos.add(repository);
}