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

后端 未结 1 989
栀梦
栀梦 2021-02-06 06:35

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

Is it possible to achieve this?

I\'ve checked the sourc

相关标签:
1条回答
  • 2021-02-06 07:22

    For leiningen v2:

    Put a profiles.clj in ./users/name/.lein (or 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 merged with ALL project profiles during lein execution.

    A good place to find information like this is the annotated sample profile on lein's github.

    0 讨论(0)
提交回复
热议问题