jcabi-aether may help you (I'm a developer). It's a simple wrapper around Aether, that lets you find all transitive dependencies of a Maven artifact:
File repo = this.session.getLocalRepository().getBasedir();
Collection<Artifact> deps = new Aether(this.getProject(), repo).resolve(
new DefaultArtifact("junit", "junit-dep", "", "jar", "4.10"),
JavaScopes.RUNTIME
);
Thus, all you need to provide as an input is:
- Local repo location, as a directory name
- List of repote repositories (
MavenProject#getRemoteRepositories()
)
- Maven coordinates of the artifact
- Maven scope to look for
Absolute paths of every dependency found can be obtained as Artifact#getPath()