leiningen: 缺少超级 pom

发布于 2024-08-24 22:28:18 字数 955 浏览 6 评论 0 原文

如果我启用 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。为什么这些软件包需要它以及我在哪里可以获得它。

if I enable eith the clojure-couchdb or swank-clojure then lein deps fails because org.apache.maven:super-pom:jar:2.0 is missing

: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"]
              ])

this error:

  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)

what is super-pom. why do these packages need it and where can I get it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

同尘 2024-08-31 22:28:18

我认为这只是意味着 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 —— 来自 此页面

Super POM 是 Maven 的默认 POM。除非显式设置,否则所有 POM 都会扩展 Super POM,这意味着 Super POM 中指定的配置将由您为项目创建的 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 on org.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 both org.clojure/clojure and org.clojure/clojure-contrib.)

Oh, and about the super POM -- from this page in Maven's docs:

The Super POM is Maven's default POM. All POMs extend the Super POM unless explicitly set, meaning the configuration specified in the Super POM is inherited by the POMs you created for your projects.

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.

鲜肉鲜肉永远不皱 2024-08-31 22:28:18

我认为项目打破依赖关系仍然很常见。这很不幸,因为它确实破坏了体验。

我的解决方案是访问 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!

遮了一弯 2024-08-31 22:28:18

我在 maven super-pom 依赖项上遇到了相同的错误,并且当我这样做时

$ sudo lein deps

它运行时没有错误。这不是一个理想的解决方案,但它对我有用。

I'm getting the same error on the maven super-pom dependency, and when I do

$ sudo lein deps

It runs without error. Not an ideal solution, but it works for me.

嘿看小鸭子会跑 2024-08-31 22:28:18

大约一年前,我不小心将 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?

空‖城人不在 2024-08-31 22:28:18

我遇到了类似的 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 that M2_HOME was set to a version of Maven I use for work. Unsetting M2_HOME fixed the issue. It appears that leiningen doesn't play nice with strange Maven implementations.

度的依靠╰つ 2024-08-31 22:28:18

使用 Ubuntu 10.10 x86_64 和 lein deps,我很烦人
...
缺少 5 个必需的工件。

对于神器:

org.apache.maven:super-pom:jar:2.0

...
但命令

sudo LEIN_ROOT=1 ~/bin/lein deps;
sudo chown -R $USER:$USER lib 

可以完成这项工作。

With Ubuntu 10.10 x86_64, with lein deps, I get annoying
...
5 required artifacts are missing.

for artifact:

org.apache.maven:super-pom:jar:2.0

...
but the commands

sudo LEIN_ROOT=1 ~/bin/lein deps;
sudo chown -R $USER:$USER lib 

do the job.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文