How to configure leiningen's maven usage?

99封情书 提交于 2019-12-10 14:36:20

问题


My problem is that leiningen is not working on my computer. I get errors like these:

Could not transfer artifact lein-ring:lein-ring:pom:0.4.5 from/to central (http://repo1.maven.org/maven2): Connection to http://repo1.maven.org r
Could not transfer artifact lein-ring:lein-ring:pom:0.4.5 from/to clojars (https://clojars.org/repo/): Connection to https://clojars.org refused

I think the problem is that I have a mirror configured in my settings.xml of my maven installation. How can I tell leiningen to use an embedded maven or some other maven installation which does not have custom configuration?

I'm using maven for other java projects and it conflicts somehow with leiningen.


回答1:


You can add mirror definitions to project.clj or, probably better in this case, to ~/.lein/profiles.clj

Details in leiningen sample project.clj

but here's the key bit:

:mirrors {"central" {:name "Ibiblio"
                     :url "http://mirrors.ibiblio.org/pub/mirrors/maven2"}
          #"clojars" {:name "Internal nexus"
                     :url "http://mvn.local/nexus/releases"
                     :repo-manager true}}


来源:https://stackoverflow.com/questions/16481227/how-to-configure-leiningens-maven-usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!