leiningen: 缺少超级 pom
如果我启用 clojure-couchdb 或 swank-clojure,那么 lein deps 会失败,因为 org.apache.maven:super-pom:jar:2.0 缺少
:dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib "1.0-SNAPSHOT"]
[clojure-http-client "1.0.0-SNAPSHOT"]
[org.apache.activemq/activemq-core "5.3.0"]
; [org.clojars.the-kenny/clojure-couchdb "0.1.3"]
; [org.clojure/swank-clojure "1.1.0"]
])
此错误:
Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) org.clojure:swank-clojure:jar:1.1.0
----------
1 required artifact is missing.
for artifact:
org.apache.maven:super-pom:jar:2.0
from the specified remote repositories:
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
central (http://repo1.maven.org/maven2)
什么是 super-pom。为什么这些软件包需要它以及我在哪里可以获得它。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我认为这只是意味着 Maven 无法满足您指定的依赖关系。我已经检查过您的消息提到的三个存储库中都没有
org.clojure/swank-clojure
工件。对于 clojure-couchdb,您正在使用的版本 - 据我所知,通过查看 其 GitHub 上的 project.clj 文件 - 依赖于org.clojure/clojure-http-client "1.0.0-SNAPSHOT"
,它不也存在于仓库中。解决此问题的一种方法是将所需的 jar 安装到本地存储库中。 (
我似乎不记得确切的命令...将在一分钟内查找它。参见例如此页面 获取说明。)然后 Maven 将从那里获取它们。(顺便说一句,如果您想使用 Clojure + contrib 1.1.0,您现在可以使用
"1.1.0"
作为版本字符串。这适用于org.clojure/clojure 和 org.clojure/clojure-contrib
。)哦,还有关于超级 POM —— 来自 此页面:
至于它是如何进入你的错误消息的,老实说我不知道。您可以将“maven”标签添加到这个问题中,或者只是用该标签提出一个单独的问题,以获得一些 Maven 专家的帮助。
I think this just means that Maven wasn't able to satisfy the dependencies you specified. I've checked there's no
org.clojure/swank-clojure
artifact in any of the three repositories your message mentions. For clojure-couchdb, the version you're using -- as far as I can tell from looking at its project.clj file on GitHub -- depends onorg.clojure/clojure-http-client "1.0.0-SNAPSHOT"
, which doesn't exist in the repos either.One way around this problem is to install the jars you want into your local repo. (
I can't seem to remember the exact command... will look it up in a minute.See e.g. this page for instructions.) Then Maven will just pick them up from there.(BTW, if you want to use Clojure + contrib 1.1.0, you can just use
"1.1.0"
as the version strings now. That's for bothorg.clojure/clojure
andorg.clojure/clojure-contrib
.)Oh, and about the super POM -- from this page in Maven's docs:
As for how it got into your error message, I've honestly no idea. You could add the "maven" tag to this question or just ask a separate question with that tag to get some Maven gurus onto it.
我认为项目打破依赖关系仍然很常见。这很不幸,因为它确实破坏了体验。
我的解决方案是访问 http://clojars.org 并搜索我需要的库。通常有几个版本。我在 http://github.com 上做了一些研究,看看哪一个是最新的。然后我尝试将其作为依赖项。如果有效的话,那就太好了!否则,我尝试另一种。
这是一个漫长的过程,但我认为它正在变得更好。这个过程你应该已经看过了!
I think it's still common that projects have broken dependencies. It's unfortunate, because it really mars the experience.
My solution is to go onto http://clojars.org and search for the library I need. Usually there are a few versions. I do a little research on http://github.com to see which one is most up to date. Then I try that one as a dependency. If it works, great! Otherwise, I try another one.
It's a long process, but I think it is getting better. You should have seen the process before!
我在 maven super-pom 依赖项上遇到了相同的错误,并且当我这样做时
它运行时没有错误。这不是一个理想的解决方案,但它对我有用。
I'm getting the same error on the maven super-pom dependency, and when I do
It runs without error. Not an ideal solution, but it works for me.
大约一年前,我不小心将 swank-clojure 上传到 org.clojure 组。我很快就删除了它,因为我与该组没有关联,所以这就是找不到它的原因。请问您在哪里找到版本错误的说明以便更正?
I accidentally uploaded swank-clojure to the org.clojure group about a year ago. I deleted it soon after since I'm not associated with that group, so that's why it can't be found. Can I ask where you found the instructions with the erroneous version so it can be corrected?
我遇到了类似的 lein-ring 问题,导致 org.apache.maven:super-pom 的依赖失败。事实证明,问题在于
M2_HOME
设置为我用于工作的 Maven 版本。取消设置M2_HOME
解决了该问题。看来 leiningen 不能很好地处理奇怪的 Maven 实现。I had a similar issue with lein-ring causing a dependency failure with regard to
org.apache.maven:super-pom
. Turns out the issue was thatM2_HOME
was set to a version of Maven I use for work. UnsettingM2_HOME
fixed the issue. It appears that leiningen doesn't play nice with strange Maven implementations.使用
Ubuntu 10.10 x86_64
和 lein deps,我很烦人...
缺少 5 个必需的工件。
对于神器:
...
但命令
可以完成这项工作。
With
Ubuntu 10.10 x86_64
, with lein deps, I get annoying...
5 required artifacts are missing.
for artifact:
...
but the commands
do the job.