You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matthew Beermann <mb...@yahoo.com> on 2006/03/29 01:20:44 UTC

[m2] Figuring out (from a plugin) what URL a dependency came from?

I'm writing a plugin that, among other things, needs to know where exactly a dependency came from; that is, a fully qualified URL to the remote repository where the artifact was retrieved.
   
  Seemed easy at first - write a mojo, iterate through project.getArtifacts(), call artifact.getRepository() on each... and the return value turns out to be always null. Huh? Why?
   
  I also had a look at the ResolutionListener interface, but it seems to suffer from the same problem: none of the callback methods are passed data that would tell me which repository is being examined.
   
  Is there any way to get at this information? Thanks!
   
  --Matthew Beermann

			
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.