I highly recommend you use the snapshots on build.clojure.org. Lein already has build.clojure.org snapshots in it's repo list. You don't need to do anything more than put
:dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.1.0-master-SNAPSHOT"]] in your project.clj -Tim On Dec 13, 11:17 am, B Smith-Mannschott <bsmith.o...@gmail.com> wrote: > I'm building clojure-contrib locally from source, and would like to > use the resulting jar file in other projects, which I'm building with > leiningen. To accomplish this, I need to get the clojure-contrib.jar > resulting form the build installed in the correct place in > ~/.m2/repository. I've been doing it by hand, because I can't figure > out how to make the combination of build.xml, pom.xml and bubble-gum > that's clojure-contrib's build system do what I need: > > (1) ant ci-build > Builds a two "slim" versions of clojure-contrib.jar, one of which is > called "slim", the other isn't. Installs these in the correct > location. i.e. almost works. > > The ci-build target claims to "Build clojure-contrib using Clojure > obtained via Maven.", but that doesn't appear to be accurate. Since it > reports > > check_hasclojure: > [echo] WARNING: You have not defined a path to clojure.jar so I > can't compile files. > [echo] This will cause some parts of clojure.contrib not to > work (e.g., pretty print). > [echo] To enable compiling, run "ant -Dclojure.jar=<...path > to clojure.jar..>" > > Well, it just so happens that I have a recent build of > clojure-1.1.0-master-SNAPSHOT under the name clojure.jar... > > (2) ant -Dclojure.jar=clojure.jar ci-build > This does ahead-of-time compilation for all clojure sources. It > produces a "slim" and a non-slim version of clojure-contrib.jar. Only > the "slim" version is actually slim. > > This does not, however, appear to ever call "mvn install". So, I'm > left with two correct .jar files, neither of which are visible to > later builds of other projects. > > Well gosh-darnit, I've got a pom.xml file lying here. Shouldn't a "mvn > install" just work? > > (3) mvn install > > [INFO] [jar:jar {execution: default-jar}] > [WARNING] JAR will be empty - no content was marked for inclusion! > [INFO] [install:install {execution: default-install}] > [INFO] Installing > /home/smithma/w/clojure-contrib/target/clojure-contrib-1.0-SNAPSHOT.jar > to > /home/smithma/.m2/repository/org/clojure/clojure-contrib/1.0-SNAPSHOT/cloju > re-contrib-1.0-SNAPSHOT.jar > > So, this installs an empty jar pretending to be clojure-contrib. This > is, of course, completely broken behavior. The next leiningen build > grabs this thinking it's getting the real deal and completely croaks. > > The problem appears to be that the ant build puts it's build products > into ./classes, but maven expects to find such things in > ./target/classes, hence nothing to put in the JAR. (and since the JAR > already built by ant is in ./, not in ./target maven can't just grab > that. > > Summary: > > I've tried three different ways to get this to work and failed. What > am I overlooking? The nightly builds exist, so clearly this must be > working for someone, just not me. > > Is it really this broken? If it really is this broken, how about > having our build.xml follow maven conventions for build products? Or > how about overriding the maven defaults in pom.xml to be in sync with > what ant is actually doing? > > Thankful for any pointers, > Ben -- 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