CollectRequest collectRequest = new CollectRequest(new org.eclipse.aether.graph.Dependency(queryArtifact,
query.getScopeType()), remoteRepos);
DependencyRequest request = new DependencyRequest(collectRequest, null);
DependencyResult artifacts;
try
{
artifacts = system.resolveDependencies(session, request);
}
catch (NullPointerException e)
{
throw new RuntimeException("Could not resolve dependencies from Query [" + query
+ "] due to underlying exception", e);
}
catch (DependencyResolutionException e)
{
throw new RuntimeException(e);
}
DependencyNode root = artifacts.getRoot();
for (DependencyNode node : root.getChildren())
{
Dependency d = MavenConvertUtils.convertToDependency(factory, node);
if (filter == null || filter.accept(d))
{