cemerick/pomegranate — pull request #45 by Chouser (2012-12-04 16:05:25+00:00)
Title: Added find-resources

When tracking down a library version problem yesterday, we found it useful to be able to look at all the jars on the classpath that included a particular .clj file. This allowed us to see we were loading it from a different .jar than we expected. Pomegranate seems a natural place to have a function that makes this easy.

For example, here's what I get when I nrepl-jack-in from the pomegranate project itself:

(find-resources "clojure/core.clj")
;=> ("jar:file:/home/chouser/.lein/self-installs/leiningen-2.0.0-preview8-standalone.jar!/clojure/core.clj" "jar:file:/home/chouser/.m2/repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar!/clojure/core.clj" "jar:file:/home/chouser/.m2/repository/org/clojure/clojure/1.3.0/clojure-1.3.0.jar!/clojure/core.clj")