use of org.sonatype.aether.repository.Proxy in project sonatype-aether by sonatype.
the class ProxyPutTest method before.
@Override
@Before
public void before() throws Exception {
super.before();
Authentication auth = new Authentication("puser", "password");
Proxy proxy = new Proxy("http", "localhost", provider().getPort(), auth);
repository().setProxy(proxy);
}
use of org.sonatype.aether.repository.Proxy in project sonatype-aether by sonatype.
the class DefaultRepositorySystemSessionTest method testDefaultProxySelectorUsesExistingProxy.
@Test
public void testDefaultProxySelectorUsesExistingProxy() {
DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
RemoteRepository repo = new RemoteRepository("id", "default", "void");
assertSame(null, session.getProxySelector().getProxy(repo));
repo.setProxy(new Proxy("http", "localhost", 8080, null));
assertSame(repo.getProxy(), session.getProxySelector().getProxy(repo));
}
Aggregations