Leiningen是否在.m2 / settings.xml中读取maven设置? [英] Does Leiningen read maven settings in .m2/settings.xml?
本文介绍了Leiningen是否在.m2 / settings.xml中读取maven设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在〜/ .m2 / settings.xml
中有几个额外的存储库。我试过 lein search
,它没有找到我的存储库中的软件包。
I have several additional repositories in ~/.m2/settings.xml
. I tried lein search
and it doesn't find the packages in my repositories. How can I tell leiningen to search repositories in maven settings?
推荐答案
您可以添加:repositories
标签添加到您的project.clj文件中:
You can add the :repositories
tag to your project.clj file:
(defproject com.foo/bar "1.0.0-SNAPSHOT"
;; ...other configuration...
:repositories [["java.net" "http://download.java.net/maven/2"]])
查看官方 sample project.clj 。
您必须从settings.xml文件中复制存储库配置,但这是使用Leiningen管理存储库的惯用和推荐的方法。
You'll have to copy over the repository configuration from your settings.xml file, but this is the idiomatic and recommended way to manage repositories with Leiningen.
lein2是否使用〜/ .m2 / settings.xml中定义的存储库?
这篇关于Leiningen是否在.m2 / settings.xml中读取maven设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文