private MirrorSelector getMirrorSelector(Settings settings) { DefaultMirrorSelector selector = new DefaultMirrorSelector(); for (Mirror mirror : settings.getMirrors()) { selector.add( String.valueOf(mirror.getId()), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(), mirror.getMirrorOfLayouts()); } return selector; }
/** * Gets mirror selector * * @return the selector */ public MirrorSelector mirrorSelector() { 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()); } return dms; }
private MirrorSelector getMirrorSelector() { DefaultMirrorSelector selector = new DefaultMirrorSelector(); for (Mirror mirror : mirrors) { selector.add( mirror.getId(), mirror.getUrl(), mirror.getType(), false, mirror.getMirrorOf(), null); } Settings settings = getSettings(); for (org.apache.maven.settings.Mirror mirror : settings.getMirrors()) { selector.add( String.valueOf(mirror.getId()), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(), mirror.getMirrorOfLayouts()); } return selector; }
static boolean matchesLayout(ArtifactRepository repository, Mirror mirror) { return matchesLayout(RepositoryUtils.getLayout(repository), mirror.getMirrorOfLayouts()); }