Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-dev] How to download dependencies of dependency artifact of an Artifact

Ren Jith wrote:

How can I download dependencies of dependency artifact of an Artifact using
the sonatype-aether  Java API.

Moving thread to user list which is the more appropriate place for this question.

I have found the below java file in git repository.

http://git.eclipse.org/c/aether/aether-demo.git/tree/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/GetDependencyTree.java

But this wont help me. because I have some custom tags and elements in
POM.xml file. So the API will give pom parser errors while downloading the
dependency.

The example uses the maven-aether-provider from the Apache Maven project to parse pom.xml and other Maven related repository files. If you employ POMs that aren't actually following Maven's schema, you will have to implement your own ArtifactDescriptorReader to tell Aether how to handle those. See org.apache.maven.repository.internal.DefaultArtifactDescriptorReader in said maven-aether-provider for an example to implement this interface.


Benjamin


Back to the top