问题
I admit this question is a bit poorly phrased. Please let me know what commands I should run to provide more information, and I will provide it.
Context: I have been using Clojure for ~ 1 year now. Mainly just through the clojure repl. Now, I'm starting to use Lein.
However, it leon does not like some of the code I have. Here is the info I have:
$ lein version
Leiningen 1.7.1 on Java 1.6.0_29 Java HotSpot(TM) 64-Bit Server VM
When I run clojure manually, I get:
Clojure 1.3.0
user=> (clojure-version)
"1.3.0"
When I run
$ lein repl
REPL started; server listening on localhost port 12572
user=> (clojure-version)
"1.2.1"
Now -- how do I fix this? I want leon to use 1.3.0, not 1.2.1
Thanks!
回答1:
The project.clj
file lists the dependencies for your lein project, including the version of clojure. So simply put [org.clojure/clojure "1.3.0"]
in the dependency vector instead of [org.clojure/clojure "1.2.1"]
. Here's a barebones example:
(defproject myproject "0.5.0-SNAPSHOT"
:description "A project for doing things."
:url "http://github.com/technomancy/myproject"
:dependencies [[org.clojure/clojure "1.3.0"]])
Their is a more detailed and annotated example on Leiningen's github
来源:https://stackoverflow.com/questions/10135440/lein-clojure-1-3-vs-clojure-1-2-1