0

我在 profile.clj 中添加了一些插件。当我开始一个新的 repl 时,它们会正确下载到.m2/repository directory(use '...)FileNotFoundException. 那么如何在项目外部的默认 repl 中使用这些插件呢?

  • 赢 7
  • clojure 1.7
  • 莱宁根 2.5.3
  • jdk1.8.0_25

    user=> (use 'hiccup.core)

    FileNotFoundException Could not locate hiccup/core...

与新下载的 Incanter 1.9.0 相同

我知道这个错误有几个问题,但都是在项目的上下文中,而不是默认的 repl。或者我只能在项目 repl 中使用插件?

提前致谢!

这是我的profiles.clj

{:user
    {
    :java-cmd "C:\\Program Files\\Java\\jdk1.8.0_25\\bin\\java.exe"
    :plugins [
      [cider/cider-nrepl "0.8.1"]
      [incanter "1.9.0"]
      [hiccup "1.0.5"]
    ]
   }
 }
4

1 回答 1

2

您可能应该将打嗝(和咒语)添加到 :dependencies 部分

{:user
    {
    :java-cmd "C:\\Program Files\\Java\\jdk1.8.0_25\\bin\\java.exe"
    :plugins [
      [cider/cider-nrepl "0.8.1"]
    ]
    :dependencies [
      [incanter "1.9.0"]
      [hiccup "1.0.5"]
    ]
   }
 }

另外,我想您最好为每个需要它们的项目将特定库添加到 project.clj 中,而不是将它们添加到全局 deps 中。

于 2015-10-04T20:22:42.993 回答