James Reeves <weavejes...@googlemail.com> writes: > I've been sketching out a design for a package manager for Clojure, > similar to Rubygems. To the best of my knowledge, there's no real > equivalent to this in Java-land. > > I'm looking for suggestions, criticisms, or for someone to tell me > that Java already has a package manager that's better than the one I'm > designing.
I agree that this is a very real need for Clojure. I cringe every time I check out a project that has a lib/ directory full of jar files, but right now the alternatives are not quite there yet. Maven actually supports dependency resolution. While I don't like Maven much for most things, its dependency resolution mechanism and repository format is quite good. It's hard to recommend that Lispers use a system that's configured in XML (yuck!), so I've created a tool called Corkscrew that lets you specify your dependencies in Clojure code: {:name "my-sample" :version "1.0" :namespaces '(my-sample) :dependencies [["rome" "0.9"]] :source-dependencies [["clojure-contrib" "r663" :svn "http://clojure-contrib.googlecode.com/svn/trunk"] ["enlive" "95b2558943f50bb9962fe7d500ede353f1b578f0" :git "git://github.com/cgrand/enlive.git"]]} Behind the scenes this is converted to XML that Maven understands, but it lets you handle transitive dependencies out of the box (in this example Rome depends on JDom, but you don't have to know that) without the crazy mess of configuring Maven. This also has the significant advantage of supporting the thousands of Java libraries out there that exist as Maven artifacts; if we as a community were to roll our own package format it would be a lot of work to republish all these. Corkscrew also supports dependencies on projects kept in Git and SVN as long as they are just Clojure code. http://github.com/technomancy/corkscrew There's lots of room for improvement, but I'm convinced that building on existing solutions is the right way to go even if Corkscrew itself turns out to be impractical. It's tempting to underestimate the complexity of a package manager, but as one of the developers of the Rubygems project, I can tell you that there are edge-cases within edge-cases, and it gets hairy quickly. -Phil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---