Package org.eclipse.aether.util.repository

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


         DefaultProxySelector dps = new DefaultProxySelector();
         dps.add(convertFromMavenProxy(activeProxy), activeProxy.getNonProxyHosts());
         session.setProxySelector(dps);
      }

      final DefaultMirrorSelector mirrorSelector = createMirrorSelector(settings);
      final LazyAuthenticationSelector authSelector = createAuthSelector(settings, mirrorSelector);

      session.setMirrorSelector(mirrorSelector);
      session.setAuthenticationSelector(authSelector);
View Full Code Here


      return session;
   }

   private DefaultMirrorSelector createMirrorSelector(Settings settings)
   {
      final DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
      final List<Mirror> mirrors = settings.getMirrors();
      if (mirrors != null)
      {
         for (Mirror mirror : mirrors)
         {
            mirrorSelector.add(mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
                     mirror.getMirrorOfLayouts());
         }
      }
      return 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

        mirrors.add( mirror );
    }
       
    MirrorSelector getMirrorSelector()
    {
        DefaultMirrorSelector selector = new DefaultMirrorSelector();

        for ( Mirror mirror : mirrors )
        {
            selector.add( mirror.getId(), mirror.getUrl(), "default", true, 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(), true,
                          mirror.getMirrorOf(), mirror.getMirrorOfLayouts() );
        }

        return selector;
    }
View Full Code Here

     * @param repositories The {@code List} of repositories
     *
     * @return The {@code MirrorSelector} to use.
     */
    MirrorSelector getMirrorSelector(final List<RemoteRepository> repositories) {
        DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
        List<Mirror> mirrors = effectiveSettings.getMirrors();
        if(!mirrors.isEmpty()) {

            List<RemoteRepository> repositoryMirrors = new ArrayList<RemoteRepository>();
            for (Mirror mirror : mirrors) {
                mirrorSelector.add(mirror.getId(),
                                   mirror.getUrl(),
                                   "default",
                                   false,
                                   mirror.getMirrorOf(),
                                   "*");
 
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.