使用 Leiningen 推送到 Nexus

发布于 2024-09-14 12:51:12 字数 399 浏览 4 评论 0原文

我使用 Leiningen 编写了一个 Clojure 项目,现在想将生成的 jar 添加到 Sonatype Nexus 服务器。我安装了 lein-clojars,因为它带有一个 push 命令,如果您想推送到 Clojars 之外的某个地方,该命令似乎接受可选的 repo arg。但是,每当我尝试此操作时,我都会收到 JSchException: Auth failed。这似乎表明某处存在身份验证问题。

我能够将 jar 复制到 Nexus,并且我还能够使用相同的 settings.xml 和 Maven 来上传到这台机器,所以我相当有信心这些都是正确的。

有没有什么好的方法可以使用Leiningen推送到其他存储库?或者它真的只是为 Clojars 构建的?

I wrote a Clojure project using Leiningen and would now like to add the resulting jar to a Sonatype Nexus server. I installed lein-clojars, since this comes with a push command that seems to accept an optional repo arg if you would like to push somewhere besides Clojars. However, whenever I try this, I get a JSchException: Auth fail. It seems to indicate that there is an authentication problem somewhere.

I am able to scp the jar to Nexus, and I am also able to use this same settings.xml with Maven to upload to this machine, so I'm fairly confident these are both correct.

Is there any good way to use Leiningen to push to other repositories? Or is it really only built for Clojars?

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

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

发布评论

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

评论(3

傲娇萝莉攻 2024-09-21 12:51:12

根据记录,Leiningen 1.5 现在有一个部署任务,可以通过 https 推送到 Nexus 和 Archiva 等 Maven 存储库: https://github.com/technomancy/leiningen/blob/master/src/leiningen/deploy.clj

For the record, Leiningen 1.5 now has a deploy task that can push to Maven repositories like Nexus and Archiva over https: https://github.com/technomancy/leiningen/blob/master/src/leiningen/deploy.clj

烟燃烟灭 2024-09-21 12:51:12

如果您要推送到真正的 Maven 存储库,那么使用 Maven 进行部署可能会更好。有一个很好的 Clojure 插件: http://github.com/talios/clojure-maven-plugin< /a>

If you're pushing to a real Maven repository, you're probably better off using Maven for deployment. There's a good Clojure plugin: http://github.com/talios/clojure-maven-plugin

等数载,海棠开 2024-09-21 12:51:12

不久前,Leiningen Google 群组上发生了相关的电子邮件交流;请参阅 Phil Hagelberg 的此消息获取答案。

简而言之,显然不可能在 JVM 上使用 DSA 密钥。我不确定 Maven 是否/如何发现可以处理这个问题,但无论如何,lein-clojars 不能。因此,您应该坚持使用 scp

(顺便说一句,这也意味着 lein-clojars 也不真正推荐用于处理 Clojars。另外,我很确定我错过了图片的某些部分,因为显然它曾经与 Clojars 合作,我非常确定的一件事是,Leiningen 目前不会对推动受保护的存储库有太大帮助,而且我上面链接的消息与权威消息一样接近。解释为什么会出现这种情况。)

A relevant exchange of e-mails happened a short while ago on the Leiningen Google group; see this message by Phil Hagelberg for the answer.

In short, it is apparently impossible to use DSA keys on the JVM. I'm not sure if/how Maven finds it possible to deal with this, but at any rate, lein-clojars doesn't. So, you should just stick to scp instead.

(Incidentally, this also means that lein-clojars is not really recommended for dealing with Clojars either. Also, I'm pretty sure that I'm missing some part of the picture, since apparently it used to work with Clojars. The one thing I am pretty sure about is that Leiningen won't be much help in pushing to protected repos at this time and that the message I linked to above is as close to an authoritative explanation of why this is that case as anything.)

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