use of org.eclipse.aether.collection.DependencyCollectionException in project fabric8 by jboss-fuse.
the class AetherBasedResolver method resolveDependencies.
protected DependencyNode resolveDependencies(RepositorySystemSession session, List<RemoteRepository> repos, DependencyNode pomNode, Dependency dependency, final Filter<Dependency> shouldExclude) throws FailedToResolveDependency {
if (!DependencyFilters.matches(dependency, shouldExclude)) {
CollectRequest cr = new CollectRequest(dependency, repos);
// request.setRequestContext("runtime");
try {
DependencyNode node = m_repoSystem.collectDependencies(session, cr).getRoot();
DependencyFilter filter = new DependencyFilter() {
public boolean accept(DependencyNode node, List<DependencyNode> parents) {
return !DependencyFilters.matches(node, shouldExclude);
}
};
DependencyRequest request = new DependencyRequest(cr, filter);
m_repoSystem.resolveDependencies(session, request);
return node;
} catch (DependencyResolutionException | DependencyCollectionException e) {
handleDependencyResolveFailure(pomNode, dependency, e);
}
}
return null;
}
Aggregations