How to configure leiningen's maven usage?
Asked Answered
A

1

5

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.

Alidaalidade answered 10/5, 2013 at 11:29 Comment(0)
N
3

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}}
Navigation answered 10/5, 2013 at 14:57 Comment(2)
This is not working. I get the same error. Connection refused :(Alidaalidade
do you need a proxy specification too?Navigation

© 2022 - 2024 — McMap. All rights reserved.