0

I need help with extending Maven Dependency plugin as it doesn't display all information I want about Dependency. I want to get source of the Dependency, linking artifacts with the repositories and displaying it as log output when the plugin goal is used.

the list-repositories goal is not good enough.

I want a output like: [INFO]groupId:artifactId:jar:version:provided:repository

Thanking you.

Avril
  • 25
  • 4
  • The first thing which comes into my mind is: Why do you need such information? Apart from that have you filed in an [issue](http://jira.codehaus.org/browse/MDEP) to express your wishes? – khmarbaise Jun 12 '13 at 12:32
  • I want find the source of each of my Dependencies. I am wondering if anyone has done this before and I am not creating issue until then. I came close to what I want to display it's just that I seem to not be able to get direct link for artifact to repository it was download from as I have few repositories in my setting.xml. – Avril Jun 12 '13 at 12:46
  • So you're thinking about the [following](http://khmarbaise.github.io/sapm/dependencies.html) which give at the end of page such kind of information. But if you have repository manager the information is not what you want. – khmarbaise Jun 12 '13 at 12:55
  • The end use is to store somewhere what Dependencies where used in project and repository they can from. I want to be able about to get artifact then use it to find out what repository it came from and display it [INFO]groupId:artifactId:jar:version:provided:repository(the repo url and path to artifact) – Avril Jun 12 '13 at 13:06
  • I get what you like but it's only possible in the way i've made a link to. – khmarbaise Jun 12 '13 at 13:31
  • I have been looking at the Maven Dependency plugin code and there is options to node.getArtifact().getRepository().getUrl() but I get null value even thought I can get artifact using node.getArtifact(). I just find it strange that I can't use it to find out what Repository it came from. – Avril Jun 12 '13 at 13:40
  • Usually you are working on the local repository which is on the local filesystem so that's the reason getting null for the URL. – khmarbaise Jun 12 '13 at 14:52

0 Answers0