Examples of RemoteRepository


Examples of org.sonatype.aether.repository.RemoteRepository

        for (RemoteRepository r : m_remoteRepos) {
            naming.put(r.getId(), r);

            r.setProxy(m_proxySelector.getProxy(r));

            RemoteRepository mirror = m_mirrorSelector.getMirror(r);
            if (mirror != null) {
                String key = mirror.getId();
                naming.put(key, mirror);
                if (!map.containsKey(key)) {
                    map.put(key, new ArrayList<String>());
                }
                List<String> mirrored = map.get(key);
                mirrored.add(r.getId());
            }
        }

        for (String mirrorId : map.keySet()) {
            RemoteRepository mirror = naming.get(mirrorId);
            List<RemoteRepository> mirroedRepos = new ArrayList<RemoteRepository>();

            for (String rep : map.get(mirrorId)) {
                mirroedRepos.add(naming.get(rep));
            }
            mirror.setMirroredRepositories(mirroedRepos);
            m_remoteRepos.removeAll(mirroedRepos);
            m_remoteRepos.add(0, mirror);
        }

    }
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

    }

    private List<RemoteRepository> selectRepositories(List<MavenRepositoryURL> repos) {
        List<RemoteRepository> list = new ArrayList<RemoteRepository>();
        for (MavenRepositoryURL r : repos) {
            list.add(new RemoteRepository(r.getId(), REPO_TYPE, r.getURL().toExternalForm()));
        }
        return list;
    }
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

         if (profile != null)
         {
            List<Repository> repositories = profile.getRepositories();
            for (Repository repository : repositories)
            {
               settingsRepos.add(new RemoteRepository(repository.getId(), repository.getLayout(), repository.getUrl()));
            }
         }
      }
      return settingsRepos;
   }
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

class MavenConvertUtils
{
   static RemoteRepository convertToMavenRepo(final DependencyRepository repo, final Settings settings)
   {
      RemoteRepository remoteRepository = new RemoteRepository(repo.getId(), "default", repo.getUrl());
      Proxy activeProxy = settings.getActiveProxy();
      if (activeProxy != null)
      {
         Authentication auth = new Authentication(activeProxy.getUsername(), activeProxy.getPassword());
         remoteRepository.setProxy(new org.sonatype.aether.repository.Proxy(activeProxy.getProtocol(), activeProxy
                  .getHost(), activeProxy.getPort(), auth));
      }
      return remoteRepository;
   }
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

      return remoteRepos;
   }

   static RemoteRepository convertToMavenRepo(final String id, String url, final Settings settings)
   {
      RemoteRepository remoteRepository = new RemoteRepository(id, "default", url);
      Proxy activeProxy = settings.getActiveProxy();
      if (activeProxy != null)
      {
         Authentication auth = new Authentication(activeProxy.getUsername(), activeProxy.getPassword());
         remoteRepository.setProxy(new org.sonatype.aether.repository.Proxy(activeProxy.getProtocol(),
                  activeProxy
                           .getHost(), activeProxy.getPort(), auth));
      }
      return remoteRepository;
   }
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

         if (profile != null)
         {
            List<Repository> repositories = profile.getRepositories();
            for (Repository repository : repositories)
            {
               settingsRepos.add(new RemoteRepository(repository.getId(), repository.getLayout(), repository
                        .getUrl()));
            }
         }
      }
      return settingsRepos;
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

               }
            }
            if (ar instanceof RemoteRepository)
            {
               ArtifactRequest request = new ArtifactRequest();
               RemoteRepository remoteRepo = new RemoteRepository(ar.getId(), ar.getContentType(),
                        ((RemoteRepository) ar).getUrl());
               request.addRepository(remoteRepo);
               request.setArtifact(artifact);

               try
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

      return session;
   }

   private RemoteRepository convertToMavenRepo(final DependencyRepository repo)
   {
      RemoteRepository remoteRepository = new RemoteRepository(repo.getId(), "default", repo.getUrl());
      Settings settings = container.getSettings();
      Proxy activeProxy = settings.getActiveProxy();
      if (activeProxy != null)
      {
         remoteRepository.setProxy(RepositoryUtils.convertFromMavenProxy(activeProxy));
      }
      return remoteRepository;
   }
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

            hasCentral = true;
         }
      }
      if (!hasCentral)
      {
         RemoteRepository central = convertToMavenRepo(new DependencyRepositoryImpl(KnownRepository.CENTRAL.getId(),
                  KnownRepository.CENTRAL.getUrl()));
         central.setPolicy(true, new RepositoryPolicy().setEnabled(false));
         remoteRepos.add(central);
      }
      return remoteRepos;
   }
View Full Code Here

Examples of org.sonatype.aether.repository.RemoteRepository

            {
                request.addMetadata( new MetadataBridge( metadata ) );
            }
        }

        RemoteRepository remoteRepo = RepositoryUtils.toRepo( deploymentRepository );
        /*
         * NOTE: This provides backward-compat with maven-deploy-plugin:2.4 which bypasses the repository factory when
         * using an alternative deployment location.
         */
        if ( deploymentRepository instanceof DefaultArtifactRepository
            && deploymentRepository.getAuthentication() == null )
        {
            remoteRepo.setAuthentication( session.getAuthenticationSelector().getAuthentication( remoteRepo ) );
            remoteRepo.setProxy( session.getProxySelector().getProxy( remoteRepo ) );
        }
        request.setRepository( remoteRepo );

        DeployResult result;
        try
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.