Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure leiningen's maven usage?

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.

like image 299
Adam Arold Avatar asked Oct 21 '22 10:10

Adam Arold


1 Answers

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}}
like image 86
sw1nn Avatar answered Nov 01 '22 07:11

sw1nn