I use leiningen to download and publish libraries, but in terms of setting up for development I use a bash script that adds whatever I need for the project to the CLASSPATH and starts the nailgun server. (swank for vimclojure) This seems to work pretty well, although it would be nice if Leiningen had mechanisms like Ant where you could customize the classpath on a project and/or task basis.
Below is the script I'm using to create the classpath for a project that has multiple git submodules located in src/lib, jars downloaded with lein deps sitting in lib, and the code in src and test. I'm normally on Ubuntu but works under Cygwin also. -Jeff ------------------------------------------------------- #!/bin/bash DEPS=lib SUBMODULES=src/lib CLASSPATH="./src:./test" # Add jar files for f in "$DEPS"/*.jar; do CLASSPATH=$CLASSPATH:$f done # Add sub-modules for f in "$SUBMODULES"/**/src; do CLASSPATH=$CLASSPATH:$f done if [[ "$OSTYPE" == 'cygwin' ]]; then CLASSPATH=`cygpath -wp "$CLASSPATH"` fi echo "$CLASSPATH" On Jan 22, 2:21 am, Richard Newman <holyg...@gmail.com> wrote: > Hi folks, > > Apparently everyone is jumping on the Leiningen bandwagon and deleting > their build.xml files. I guess that means I'm moving, too. > > Now, I like to keep track of Clojure master. Right now, Clojure > reports "Clojure 1.2.0-master-SNAPSHOT". > > (I don't see that in Maven Central or in Clojars, so I guess I have to > put it in my local repository...?) > > Unfortunately, not everybody keeps up-to-date like I do; most of the > projects I use demand "1.1.0-alpha-SNAPSHOT". I'm sure there are still > projects that demand 1.0. > > Adjusting the lein script to use my local Clojure install gave me a > great error: > > Caused by: java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V > at clojure.contrib.with_ns$with_ns__7929.<init>(with_ns.clj:20) > at clojure.contrib.with_ns__init.load(Unknown Source) > at clojure.contrib.with_ns__init.<clinit>(Unknown Source) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:247) > at clojure.lang.RT.loadClassForName(RT.java:1523) > at clojure.lang.RT.load(RT.java:396) > at clojure.lang.RT.load(RT.java:378) > at clojure.core$load__4869$fn__4876.invoke(core.clj:4294) > at clojure.core$load__4869.doInvoke(core.clj:4293) > at clojure.lang.RestFn.invoke(RestFn.java:409) > at clojure.core$load_one__4810.invoke(core.clj:4130) > at clojure.core$load_lib__4825.doInvoke(core.clj:4167) > at clojure.lang.RestFn.applyTo(RestFn.java:143) > at clojure.core$apply__3434.invoke(core.clj:478) > at clojure.core$load_libs__4841.doInvoke(core.clj:4193) > at clojure.lang.RestFn.applyTo(RestFn.java:138) > at clojure.core$apply__3434.invoke(core.clj:480) > at clojure.core$use__4865.doInvoke(core.clj:4271) > at clojure.lang.RestFn.invoke(RestFn.java:409) > at leiningen.core$eval__5$loading__4758__auto____6.invoke(core.clj:1) > at leiningen.core$eval__5.invoke(core.clj:1) > at clojure.lang.Compiler.eval(Compiler.java:5349) > > and I saw a similar problem with builds that referred to libraries > built with different versions of Clojure. > > How do people deal with this? How can one simultaneously use two > libraries which have hardwired dependencies on two different Clojure > versions, each of which might be mutually incompatible? > > What's the community protocol around locally installing Clojure 1.2, > and adding that as a dependency for a published library? > > What's the right way to get lein itself to use a recent Clojure build, > rather than the version with which it ships? > > Thoughts -- and answers! -- welcome. > > Thanks, > > -R -- 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