[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
|
[aether-users] Obtaining a list of direct dependencies
|
Hi,
I need to get a list for all direct(not transitive) dependencies for an artifact. My code for this is:
CollectRequest collectRequest = new CollectRequest();
collectRequest.addRepository(remoteRepository);
Dependency artifactDependency = new Dependency(artifact, "compile");
collectRequest.addDependency(artifactDependency);
CollectResult collectResult = repoSystem.collectDependencies(
session, collectRequest);
DependencyNode root = collectResult.getRoot();
List<DependencyNode> children = root.getChildren().iterator()
.next().getChildren();
The problem here is, that this will give me artifacts in the form like this:
activeio:activeio:jar:${activeio_version}
Properties aren't resolved.
I've tried the same thing using the ArtifactDescriptorRequest but this gets me the same result.
Is there a way to resolve version properties?
Thanks
Johannes Dorn