use of org.eclipse.aether.util.repository.JreProxySelector in project spring-boot by spring-projects.
the class DefaultRepositorySystemSessionAutoConfiguration method apply.
@Override
public void apply(DefaultRepositorySystemSession session, RepositorySystem repositorySystem) {
if (session.getLocalRepositoryManager() == null) {
LocalRepository localRepository = new LocalRepository(getM2RepoDirectory());
LocalRepositoryManager localRepositoryManager = repositorySystem.newLocalRepositoryManager(session, localRepository);
session.setLocalRepositoryManager(localRepositoryManager);
}
ProxySelector existing = session.getProxySelector();
if (existing == null || !(existing instanceof CompositeProxySelector)) {
JreProxySelector fallback = new JreProxySelector();
ProxySelector selector = existing == null ? fallback : new CompositeProxySelector(Arrays.asList(existing, fallback));
session.setProxySelector(selector);
}
}
Aggregations