[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aether-users] Usage of ProxySelector with Request Object?
|
Patrick Gottschaemmer wrote:
Thread [Worker-6] (Suspended (entry into method getProxy in
MyProxySelector))
owns: ModelRepository (id=98)
MyProxySelector.getProxy(RemoteRepository) line: 22
DefaultRemoteRepositoryManager.aggregateRepositories(RepositorySystemSession,
List<RemoteRepository>, List<RemoteRepository>, boolean) line: 190
DefaultDependencyCollector.collectDependencies(RepositorySystemSession,
CollectRequest) line: 202
DefaultRepositorySystem.resolveDependencies(RepositorySystemSession,
DependencyRequest) line: 333
ModelRepository.resolve(Artifact, IProgressMonitor) line: 224
From your original mail:
I've debugged the Code below and came to the following result:
[...]
Code:
public void deploy(Artifact artifact) throws DeploymentException {
RepositorySystemSession session = newSession();
DeployRequest r = new DeployRequest();
r.addArtifact(artifact);
r.setRepository(remoteRepository);
system.deploy(session, r);
log.info("deployed '{}' to {}", artifact, remoteRepository.getUrl());
}
I.e. the code snippet in your first mail essentially calls
RepositorySystem.deploy(), the stack trace from your last mail shows
RepositorySystem.resolveDependencies(). I get the feeling there has been
a mixup of information.
Why do I have to to extract the Proxy from the ProxySelector separately,
wouldn't it be more intuitive to use the ProxySelector directly for
RemoteRepository?
All roads lead to Rome, the current design is simply what I like most.
It makes a RemoteRepository instance a complete description of the
required network connection (host, proxy and auth) and avoids repeated
proxy selection when a remote repo gets contacted multiple times.
Benjamin