Package org.eclipse.aether.util.repository

Examples of org.eclipse.aether.util.repository.DefaultMirrorSelector


            {
                logger.debug( problem.getMessage(), problem.getException() );
            }
        }

        DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
        for ( Mirror mirror : request.getMirrors() )
        {
            mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
                                mirror.getMirrorOfLayouts() );
        }
        session.setMirrorSelector( mirrorSelector );

        DefaultProxySelector proxySelector = new DefaultProxySelector();
View Full Code Here


            // 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);
            }
View Full Code Here

     *
     * @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;
    }
View Full Code Here

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

            {
                logger.debug( problem.getMessage(), problem.getException() );
            }
        }

        DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
        for ( Mirror mirror : request.getMirrors() )
        {
            mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
                                mirror.getMirrorOfLayouts() );
        }
        session.setMirrorSelector( mirrorSelector );

        DefaultProxySelector proxySelector = new DefaultProxySelector();
View Full Code Here

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

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

          + "' on '" + target + "'", e);
    }
  }

  private MirrorSelector createMirrorSelector(Settings settings) {
    DefaultMirrorSelector selector = new DefaultMirrorSelector();
    for (Mirror mirror : settings.getMirrors()) {
      selector.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false,
          mirror.getMirrorOf(), mirror.getMirrorOfLayouts());
    }
    return selector;
  }
View Full Code Here

        return selector;
    }

    public MirrorSelector getMirrorSelector() {
        final 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;
    }
View Full Code Here

                        .getUrl()).build());
            }
         }
      }

      final DefaultMirrorSelector mirrorSelector = createMirrorSelector(settings);

      final List<RemoteRepository> mirrorsForSettingsRepos = new ArrayList<>();
      for (Iterator<RemoteRepository> iter = settingsRepos.iterator(); iter.hasNext();)
      {
         RemoteRepository settingsRepository = iter.next();
         RemoteRepository repoMirror = mirrorSelector.getMirror(settingsRepository);
         // If a mirror is available for a repository, then remove the repo, and use the mirror instead
         if (repoMirror != null)
         {
            iter.remove();
            mirrorsForSettingsRepos.add(repoMirror);
View Full Code Here

TOP

Related Classes of org.eclipse.aether.util.repository.DefaultMirrorSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.