repositorySession.setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(repositorySession,
localRepo));
repositorySession.setOffline(settings.isOffline());
List<Mirror> mirrors = executionRequest.getMirrors();
DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
if (mirrors != null)
{
for (Mirror mirror : mirrors)
{
mirrorSelector.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
mirror.getMirrorOfLayouts());
}
}
repositorySession.setMirrorSelector(mirrorSelector);