我正在尝试使用S3马车-私人插件。我有两个莱茵项目:
在我的~/..lein/profiles.clj文件中有以下内容:
{:repl {:dependencies [[org.clojure/tools.nrepl "0.2.12"]]}
:user {:plugins [[cider/cider-nrepl "0.10.0"]
[s3-wagon-private "1.2.0"]]
:signing {:gpg-key "0xabcdef12"}
:repositories [["private" {:url "s3p://acme/releases/"
:username :env
:passphrase :env}]]}}当我在项目X中运行lein deploy private时,一切都很正常,并被部署到S3中。
当我在项目Y中运行lein deploy private时,它抱怨无法找到项目X。
Could not find artifact X:X:jar:0.7.0 in central (https://repo1.maven.org/maven2/)
Could not find artifact X:X:jar:0.7.0 in clojars (https://clojars.org/repo/)
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.换句话说,它并不是在我的私人S3回购中寻找项目X。我该如何解决这个问题?
最新情况: 2016-04-25
丹尼尔·康普顿在评论中问道:
当您在项目Y中运行lein时会发生什么?从您的错误消息来看,存储库“私有”似乎不存在于项目Y中。
当我在项目Y中运行lein deps时,而不是给出了任何错误:
(py3)aj-laptop:red aj$ lein deps
(:repositories detected in user-level profiles! [:user]
See https://github.com/technomancy/leiningen/wiki/Repeatability)因此,我在项目Y中向project.clj添加了以下内容。这使lein deploy private如预期的那样工作:
:repositories [["private" {:url "s3p://acme/releases/"
:username :env
:passphrase :env}]]因此,项目Y似乎没有从我的~/..lein/profiles.clj文件中获取:存储库。但X项目似乎还不错。
发布于 2016-04-26 07:58:00
问题是:repositories是在用户~/.lein/profiles.clj文件中指定的。Leiningen 不太喜欢这个.我怀疑这里有一个潜在的bug,可能是在Lein插件和依赖解决系统之间的交互中。因为通常不建议将:repositories放在您的用户配置文件中,所以人们以前可能还没有遇到过这种情况。
我认为最好的解决方案可能是将:repositories添加到每个文件中,尽管这可能很烦人。
https://stackoverflow.com/questions/36812269
复制相似问题