2016-06-19 113 views
0

如果我嘗試使用clojure.tools.namespaceClojure的工具命名空間似乎並沒有工作

user> (require 'clojure.tools.namespace.repl) 

我收到以下錯誤:

FileNotFoundException Could not locate clojure/tools/namespace/repl__init.class or clojure/tools/namespace/repl.clj on classpath. clojure.lang.RT.load (RT.java:456) 
    Show: Clojure Java REPL Tooling Duplicates All (13 frames hidden) 

1. Unhandled java.io.FileNotFoundException 
    Could not locate clojure/tools/namespace/repl__init.class or 
    clojure/tools/namespace/repl.clj on classpath. 

        RT.java: 456 clojure.lang.RT/load 
        RT.java: 419 clojure.lang.RT/load 
        core.clj: 5893 clojure.core/load/fn 
        core.clj: 5892 clojure.core/load 
        core.clj: 5876 clojure.core/load 
       RestFn.java: 408 clojure.lang.RestFn/invoke 
        core.clj: 5697 clojure.core/load-one 
        core.clj: 5692 clojure.core/load-one 
        core.clj: 5737 clojure.core/load-lib/fn 
        core.clj: 5736 clojure.core/load-lib 
        core.clj: 5717 clojure.core/load-lib 
       RestFn.java: 142 clojure.lang.RestFn/applyTo 
        core.clj: 648 clojure.core/apply 
        core.clj: 5774 clojure.core/load-libs 
        core.clj: 5758 clojure.core/load-libs 
       RestFn.java: 137 clojure.lang.RestFn/applyTo 
        core.clj: 648 clojure.core/apply 
        core.clj: 5796 clojure.core/require 
        core.clj: 5796 clojure.core/require 
       RestFn.java: 408 clojure.lang.RestFn/invoke 
         REPL: 45 user/eval10185 
         REPL: 45 user/eval10185 
      Compiler.java: 6927 clojure.lang.Compiler/eval 
      Compiler.java: 6890 clojure.lang.Compiler/eval 
        core.clj: 3105 clojure.core/eval 
        core.clj: 3101 clojure.core/eval 
        main.clj: 240 clojure.main/repl/read-eval-print/fn 
        main.clj: 240 clojure.main/repl/read-eval-print 
        main.clj: 258 clojure.main/repl/fn 
        main.clj: 258 clojure.main/repl 
        main.clj: 174 clojure.main/repl 
       RestFn.java: 1523 clojure.lang.RestFn/invoke 
    interruptible_eval.clj: 87 clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn 
        AFn.java: 152 clojure.lang.AFn/applyToHelper 
        AFn.java: 144 clojure.lang.AFn/applyTo 
        core.clj: 646 clojure.core/apply 
        core.clj: 1881 clojure.core/with-bindings* 
        core.clj: 1881 clojure.core/with-bindings* 
       RestFn.java: 425 clojure.lang.RestFn/invoke 
    interruptible_eval.clj: 85 clojure.tools.nrepl.middleware.interruptible-eval/evaluate 
    interruptible_eval.clj: 55 clojure.tools.nrepl.middleware.interruptible-eval/evaluate 
    interruptible_eval.clj: 222 clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn 
    interruptible_eval.clj: 190 clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn 
        AFn.java: 22 clojure.lang.AFn/run 
    ThreadPoolExecutor.java: 1142 java.util.concurrent.ThreadPoolExecutor/runWorker 
    ThreadPoolExecutor.java: 617 java.util.concurrent.ThreadPoolExecutor$Worker/run 
       Thread.java: 745 java.lang.Thread/run 

profiles.clj看起來是這樣的:

{:repl {:plugins [ 
       [cider/cider-nrepl "0.12.0"] 
       [org.clojure/tools.namespace "0.2.11"] 
      ]}} 

我在做什麼錯?

回答

3

clojure.tools.namespace是一個依賴項,而不是一個插件,所以它需要在你的project.clj中的:dependencies鍵下。