OK, one more quick hack I've found -- again, a hack, not a long term solution. If you want to create a Leiningen project that uses the latest clojure and contrib, read on. I couldn't figure out what to use in project.clj unless I renamed this file first.

% mv ~/.m2/repository/org/clojure/contrib/complete/1.3.1-SNAPSHOT/ complete-1.3.1-SNAPSHOT-bin.jar ~/.m2/repository/org/clojure/contrib/ complete/1.3.1-SNAPSHOT/complete-1.3.1-SNAPSHOT.jar
% lein new myproj
% cd myproj

Now edit project.clj file so its :dependencies look like the one below.

  :dependencies [[org.clojure/clojure "1.3.0-master-SNAPSHOT"]
                 [org.clojure.contrib/complete "1.3.1-SNAPSHOT"]])

Out of curiosity, I tried adding swank-clojure 1.2.1 in :dev- dependencies, but I got a run time exception when trying 'lein swank'. Not too surprising. 'lein repl' will have to do for now.

Andy

On Sep 22, 2010, at 9:10 PM, Andy Fingerhut wrote:

OK, it appears one more line of change allows clojure-contrib latest as of today to build with clojure 1.3.0-master-SNAPSHOT. See inline below for slightly modified instructions that worked for me on both OS X and Ubuntu Linux.

On Sep 22, 2010, at 6:16 PM, Andy Fingerhut wrote:

So I'm trying to start from a Mac OS X 10.5.8 system with java and mvn installed, but not Clojure, and with no Maven repo (i.e. ~/.m2 does not exist yet), and trying to build the latest Clojure and contrib from the git repos using something as close to the recommended instructions that comes in those repos as I can find, plus what I've learned from this thread. I've gotten the latest Clojure to build and install in ~/.m2, but when I try to use that clojure-1.3.0-master-SNAPSHOT.jar to build contrib, it fails.

Here are the steps I took to build Clojure:

% git clone http://github.com/clojure/clojure.git
% cd clojure

[ downloaded maven-ant-tasks-2.1.1.jar and saved it here: /Users/ Shared/sw/maven-ant-tasks-2.1.1.jar ]

% ant -lib /Users/Shared/sw/maven-ant-tasks-2.1.1.jar ci-build

Verified that I now have an ~/.m2 directory tree, and it contains this file, among others:

~/.m2/repository/org/clojure/clojure/1.3.0-master-SNAPSHOT/ clojure-1.3.0-master-SNAPSHOT.jar

Now try to use that to build contrib using these commands:

% cd ..
% git clone http://github.com/clojure/clojure-contrib.git
% cd clojure-contrib

Now do this with the attached patch file:

% patch -p1 < clojure-contrib-patch.txt
% mvn install

After that, I had clojure, contrib, and a bunch of other dependencies in my Maven repo in ~/.m2

I'm guessing that the "patch" step above will soon be unnecessary when the contrib maintainers decide how best to improve it. I'm just going for the quick and dirty fix here.

Andy


<clojure-contrib-patch.txt>

--
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

Reply via email to