我已经和 lein2 一起工作了一段时间,它一直运行良好。但是今天麻烦开始了,无论我用 lein2 输入哪个命令,它都会给我以下错误。我尝试删除〜/ .m2,在这种情况下它会再次下载deps,但最后给了我同样的错误。
我也试过删除并再次下载 lein2。以下是它给出的错误 -
检查 :dependencies 和 :repositories 是否有错别字。指定的 jar 可能不在任何存储库中。如果是这样,请参阅http://j.mp/repeatability下的“自由浮动罐子”无法解析依赖项
无论项目或文件夹如何,都会发生错误。下面是我的 ~/.lein/profiles.clj -
{:user {:plugins [[lein-immutant "0.8.1"]
[lein-difftest "1.3.7"]
[lein-marginalia "0.7.1"]
[lein-pprint "1.1.1"]
[lein-swank "1.4.4"]
[lein-ring "0.7.5"]
[lein-cljsbuild "0.2.7"]
[lein-eclipse "1.0.0"]
[lein-git-deps "0.0.1-SNAPSHOT"]
[lein-outdated "0.1.0"]
[lein-noir "1.2.1"]
[lein-beanstalk "0.2.2"]
[lein-cloudbees "1.0.0"]
[lein-pedantic "0.0.3"]
[clj-ns-browser "1.3.0"]
[lein-ritz "0.4.2"]
[lein-midje "2.0.0-SNAPSHOT"]]}}
下面是 project.clj 文件 -
(defproject hs-2 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[net.cgrand/moustache "1.1.0" :exclusions [org.clojure/clojure]]
[enlive "1.0.1" :exclusions [org.clojure/clojure]]
[ring "1.1.5"]
[clj-time "0.4.4"]
[clj-http "0.5.3"]
[org.thnetos/cd-client "0.3.4" :exclusions [[org.clojure/clojure] cheshire]]
[clojurewerkz/urly "1.0.0"]
[clj-airbrake "2.0.0"]]
:profiles {:dev {:dependencies [[ring-serve "0.1.2"]
[ring-mock "0.1.3"]
[ritz/ritz-debugger "0.4.2"]
[ritz/ritz-repl-utils "0.4.2"]
[midje "1.4.0" :exclusions [org.clojure/clojure]]]}}
:ring {:handler hs-2.routes/my-app}
:repl-options {:init-ns hs-2.core
:init (do
(use 'hs-2.routes)
(use 'ring.util.serve)
(serve my-app)
(use 'ring.mock.request)
)}
:resource-paths ["resources/public"]
:pedantic :warn)