Leiningen: How to adjust the location of the .m2 folder?

I would like to change the location of the .m2 folder where leiningen stores all the dependencies (on Linux).

Can this be achieved?

I checked the source code of the lein.sh script and all the environment variables, but there is nothing that seems to point to $ HOME $ /. m2

+6
source share
1 answer

For leiningen v2:

Place the profile.clj file in. /users/name/.lein (or the Linux equivalent) containing the following

{:user {;Location of local repository :local-repo "Drive/Path" ;Location of locally installed jars ;(that can't be downloaded from public repo's) :repositories {"local" {:url "file://Drive/Path" :releases {:checksum :ignore}}}}} 

This user profile is combined with all project profiles during lein execution.

A good place to look for such information is the annotated profile on lein github.

+10
source

Source: https://habr.com/ru/post/926191/


All Articles