Leiningen:如何自定义.m2文件夹的位置? [英] Leiningen: How to customize the location of the .m2 folder?
问题描述
我想更改.ine2文件夹中位于leiningen上的所有依赖关系的位置(在Linux上)。
我已经检查了lein.sh脚本和所有环境变量的源代码,但没有什么可以指向$ HOME $ /。m2
对于leiningen v2:
将一个profiles.clj放入./users/name/。包含以下内容的lein(或Linux等效项):
{:user {;本地存储库的位置
:local-repo 驱动器/路径
;本地安装的jar的位置
;(无法从公共仓库中下载)
:repositories {local{:urlfile:// Drive / Path
:releases {:checksum:ignore}}}}}
找到这样的信息的好地方是在lein的github上注释的示例个人资料。
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 source code of the lein.sh script and all environment variables but there's nothing which seems to point to $HOME$/.m2
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.
这篇关于Leiningen:如何自定义.m2文件夹的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!