Does Leiningen read maven settings in .m2/settings.xml?

前端 未结 2 925
刺人心
刺人心 2021-02-08 05:03

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

2条回答
  •  清歌不尽
    2021-02-08 05:33

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

    Take a look at the official sample project.clj.

    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.

    Does lein2 use repositories defined in ~/.m2/settings.xml?

提交回复
热议问题