Package org.eclipse.aether.repository

Examples of org.eclipse.aether.repository.Proxy


        return result;
    }

    private static Proxy toProxy( org.apache.maven.repository.Proxy proxy )
    {
        Proxy result = null;
        if ( proxy != null )
        {
            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
            authBuilder.addUsername( proxy.getUserName() ).addPassword( proxy.getPassword() );
            result = new Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), authBuilder.build() );
        }
        return result;
    }
View Full Code Here


        return result;
    }

    private static Proxy toProxy( org.apache.maven.repository.Proxy proxy )
    {
        Proxy result = null;
        if ( proxy != null )
        {
            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
            authBuilder.addUsername( proxy.getUserName() ).addPassword( proxy.getPassword() );
            result = new Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), authBuilder.build() );
        }
        return result;
    }
View Full Code Here

        return result;
    }

    private static Proxy toProxy( org.apache.maven.repository.Proxy proxy )
    {
        Proxy result = null;
        if ( proxy != null )
        {
            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
            authBuilder.addUsername( proxy.getUserName() ).addPassword( proxy.getPassword() );
            result = new Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), authBuilder.build() );
        }
        return result;
    }
View Full Code Here

            Authentication authentication = null;
            if (StringUtils.isNotBlank(resolutionHelper.getRepoUsername())) {
                authentication = new AuthenticationBuilder().addString("username", resolutionHelper.getRepoUsername())
                        .addSecret("password", resolutionHelper.getRepoPassword()).build();
            }
            Proxy proxy = null;
            if (StringUtils.isNotBlank(resolutionHelper.getProxyHost())) {
                Authentication auth = new AuthenticationBuilder()
                        .addString("username", resolutionHelper.getProxyUsername()).addSecret("password", resolutionHelper.getProxyPassword()).build();
                proxy = new Proxy(null, resolutionHelper.getProxyHost(), resolutionHelper.getProxyPort(), auth);
            }

            if (StringUtils.isNotBlank(snapshotRepoUrl)) {
                logger.debug("[buildinfo] Enforcing snapshot repository for resolution: " + snapshotRepoUrl);
                RepositoryPolicy releasePolicy = new RepositoryPolicy(false, RepositoryPolicy.UPDATE_POLICY_DAILY, RepositoryPolicy.CHECKSUM_POLICY_WARN);
View Full Code Here

            authentication = new AuthenticationBuilder().addUsername(proxy.getUsername())
                    .addPassword(proxy.getPassword()).build();
        } else {
            authentication = null;
        }
        return new Proxy(proxy.getProtocol(), proxy.getHost(), proxy.getPort(), authentication);
    }
View Full Code Here

        return result;
    }

    private static Proxy toProxy( org.apache.maven.repository.Proxy proxy )
    {
        Proxy result = null;
        if ( proxy != null )
        {
            AuthenticationBuilder authBuilder = new AuthenticationBuilder();
            authBuilder.addUsername( proxy.getUserName() ).addPassword( proxy.getPassword() );
            result = new Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), authBuilder.build() );
        }
        return result;
    }
View Full Code Here

  }

  @Override
  public Proxy getProxy(RemoteRepository repository) {
    for (ProxySelector selector : this.selectors) {
      Proxy proxy = selector.getProxy(repository);
      if (proxy != null) {
        return proxy;
      }
    }
    return null;
View Full Code Here

    assertAuthenticationSelectorConfiguration(session, repository);
  }

  private void assertProxySelectorConfiguration(DefaultRepositorySystemSession session,
      RemoteRepository repository) {
    Proxy proxy = session.getProxySelector().getProxy(repository);
    repository = new RemoteRepository.Builder(repository).setProxy(proxy).build();
    AuthenticationContext authenticationContext = AuthenticationContext.forProxy(
        session, repository);
    assertEquals("proxy.example.com", proxy.getHost());
    assertEquals("proxyuser",
        authenticationContext.get(AuthenticationContext.USERNAME));
    assertEquals("somepassword",
        authenticationContext.get(AuthenticationContext.PASSWORD));
  }
View Full Code Here

        {
            AuthenticationBuilder auth = new AuthenticationBuilder();
            auth.addUsername( proxy.getUsername() );
            auth.addPassword( proxy.getPassword() );

            selector.add( new Proxy( proxy.getProtocol(), proxy.getHost(),
                                     proxy.getPort(), auth.build() ),
                          proxy.getNonProxyHosts() );
        }
        return selector;
   
View Full Code Here

        {
            int i = userInfo.indexOf(':');
            authentication.addUsername( userInfo.substring( 0, i ) );
            authentication.addPassword( userInfo.substring( i + 1 ) );
        }
        settings.addProxy( new Proxy( u.getProtocol(), u.getHost(), u.getPort(), authentication.build() ) );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.aether.repository.Proxy

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.