Leiningen 2 doesn't seem to use the localRepository setting in my ~/.m2/settings.xml file, it just dumps everything it downloads into ~/.m2/repository regardless.
How can I tell leiningen 2 where to download stuff to?
You can override the local repository location for an individual project in the project.clj file like this
(defproject test-local "1.0.0-SNAPSHOT"
:description "Use a local repo location."
:dependencies [[org.clojure/clojure "1.3.0"]
[com.cemerick/pomegranate "0.0.13"]]
:local-repo "my-repo")
It is possible to set a relative path under the project directory as above or an absolute path. It doesn't seem to be possible to use a shortcut for the home directory and set this to something like "~/my-repo".
You can make all projects use the same location by adding the key to your profiles.clj file.
{:user {:plugins [[lein-swank "1.4.4"]]
:local-repo "/home/jeff/my-repo"}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With