I have created one lein project, than updating its project.clj with dev-dependency of eclips
I ran "lein deps"
it downloaded all dependencies
but into my.m2/repository directory there is no clojure directory. and this causes me
leiningen.eclipse Problem loading: java.io.FileNotFoundException: Could not locate clojure/contrib/duck_streams__init.class or clojure/contrib/duck_streams.clj on classpath: (eclipse.clj:1)
error when i ran "lein help" which abandons me to develop with eclipse because i cant run my "lein eclipse" command.
Any solution for this??? Thanks in advance.
my project.clj is given below
(
defproject for_test "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.2.1"]]
:dev-dependencies [[lein-eclipse "1.0.0"]]
)
Thnks 'n Regards, chirag ghiyad
clojure.contrib is a separate library, and so it's dependency needs to be stated explicitly
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/contrib "1.2.0"]]
From 1.3 upwards, the monolithic clojure.contrib is no more, and libraries have been split off as separate libraries.
These libraries should be found in /m2/org/clojure/clojure and /m2/org/clojure/clojure/contrib. Be aware these aren't put into your classpath automatically, only by running lein eclipse
after running lein deps
, which edits your eclipse .classpath and .projects file.
By the way, I would suggest using lein plugin install lein-ccw "1.2.0"
, which is Clojure 1.3 compatible compared to lein-eclipse. Instead of running lein eclipse
after lein deps
, you should use lein ccw
.
I've always installed either lein-eclipse or lein-ccw plugins into leiningen through a commandline, so I don't know how dev-dependencies should work. In Leiningen 2.0, they separated plugin and dev-dependency functionality.
(Note: both of these plugins are only usable in stable Leiningen 1.7.1)
That answer is out-dated, notice that the package name should be /clojure-contrib rather than /contrib, otherwise
lein deps
won't find the packages
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojure-contrib "1.2.0"]]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With