use of org.eclipse.aether.resolution.DependencyResult in project pinpoint by naver.
the class DependencyResolver method resolveArtifactsAndDependencies.
public List<File> resolveArtifactsAndDependencies(List<Artifact> artifacts) throws DependencyResolutionException {
List<Dependency> dependencies = new ArrayList<>();
for (Artifact artifact : artifacts) {
dependencies.add(new Dependency(artifact, JavaScopes.RUNTIME));
}
CollectRequest collectRequest = new CollectRequest((Dependency) null, dependencies, repositories);
DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(JavaScopes.RUNTIME);
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, classpathFilter);
DependencyResult result = system.resolveDependencies(session, dependencyRequest);
List<File> files = new ArrayList<>();
for (ArtifactResult artifactResult : result.getArtifactResults()) {
files.add(artifactResult.getArtifact().getFile());
}
return files;
}
use of org.eclipse.aether.resolution.DependencyResult in project jqa-core-framework by buschmais.
the class AetherPluginResolverImpl method createClassLoader.
@Override
public PluginClassLoader createClassLoader(ClassLoader parent, List<Plugin> plugins) {
List<Dependency> requiredPlugins = getRequiredPluginDependencies(plugins);
DependencyResult dependencyResult = resolvePlugins(requiredPlugins);
return new PluginClassLoader(getDependencyURLs(dependencyResult), parent);
}
Aggregations