How does Maven find a Artifact in a remote repository?
Posted
by Thomas
on Stack Overflow
See other posts from Stack Overflow
or by Thomas
Published on 2010-05-26T05:04:52Z
Indexed on
2010/05/31
13:52 UTC
Read the original article
Hit count: 230
I'm trying to create a maven plugin to generate a file with the URL to all the dependencies in a project. I have been able to get the dependencies and their artifact, but I'm having trouble getting the download URL.
Using ArtifactResolver and ArticateMetadataSource I get some of the artifact information. However I fail to get all the information for all the dependencies. I haven't been able to find documentation on the resolution logic, so that I can call it form my plugin. I can use an ArtifactResolver to download the artifact, but what I really wanted was just the URL.
The Maven Artifact API has a a method called getDownloadURL (see http://maven.apache.org/ref/2.0.4/maven-artifact/apidocs/org/apache/maven/artifact/Artifact.html). However I cant seem to find a way to get a real value into it. I always get a null value. Is there a way to have it resolved (downloading or not) and get the URL for where the file came from?
© Stack Overflow or respective owner