In leiningen eclipse Could not find clojure / contrib / duck_streams__init.class or clojure / contrib / duck_streams.clj

I created one lane project than updating its project.clj with dev-dependent eclipses

I ran "lein deps"

he downloaded all the dependencies

but there is no clojure directory in my.m2 / repository directory. and it makes me

leiningen.eclipse Loading problem: java.io.FileNotFoundException: Could not find clojure / contrib / duck_streams__init.class or clojure / contrib / duck_streams.clj in the classpath: (eclipse.clj: 1)

when I ran "lein help", which leaves me to develop using eclipse, because I can not run the command "lein eclipse".

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

+6
source share
2 answers

clojure.contrib is a separate library, and therefore its dependency must be explicitly specified

 :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/contrib "1.2.0"]] 

From 1.3 to the more monolithic clojure.contrib is no more, and the libraries are separated as separate libraries .

These libraries should be found in / m 2 / org / clojure / clojure and / m2 / org / clojure / clojure / contrib. Remember that they do not automatically get to your class path only by running lein eclipse after running lein deps , which edits your eclipse.classpath and .projects file.

By the way, I would suggest using the lein plugin install lein-ccw "1.2.0" , which Clojure 1.3 is compatible with lein-eclipse. Instead of lein eclipse after lein deps you should use lein ccw .

I always installed lein-eclipse or lein-ccw plugins in leiningen via the command line, so I don’t know how dev-dependencies work. In Leiningen 2.0, they shared the functionality of the plugin and dev-dependency.

(Note: both of these plugins are used only in stable Leiningen 1.7.1)

+5
source

This answer is deprecated, note that the package name must be / clojure-contrib, not / contrib, otherwise

 lein deps 

will not find the parcel

 :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojure-contrib "1.2.0"]] 
+3
source

Source: https://habr.com/ru/post/914128/


All Articles