我在Leiningen项目文件中只引用了一个额外的依赖项:
(defproject foo-bar "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 [
[com.github.sharispe/slib-sml "0.9"]
[org.clojure/clojure "1.5.1"]
])
lein test
抱怨:
lein test
Could not find artifact com.github.sharispe:slib:pom:0.9 in central (https://repo1.maven.org/maven2/)
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Tests failed.
请注意,pom的工件ID不正确,-sml
部分被丢弃......当然,jar位于中央:
lein search slib-sml
Searching over Artifact ID...
== Showing page 1 / 1
[com.github.sharispe/slib-sml "0.9"] Semantic measures library
有人知道为什么lein似乎放弃了工件ID的-sml
部分?我知道破折号不符合clj命名约定,但是如果是外部依赖,这应该可行。
(顺便说一下:lein --version
Leiningen 2.5.0 on Java 1.7.0_67 Java HotSpot(TM) 64-Bit Server VM
) - 是的,我有一个有效的互联网连接:)
答案 0 :(得分:1)
正如Alex指出的那样,这是神器本身的一个问题,而不是leiningen。