我想更改 .m2 文件夹的位置,其中 leiningen 存储所有依赖项(在 Linux 上)。
有可能实现这一目标吗?
我检查了 lein.sh 脚本的源代码和所有环境变量,但似乎没有指向 $HOME$/.m2
最佳答案
对于 leiningen v2:
在 ./users/name/.lein(或 Linux 等效文件)中放置一个包含以下内容的 profiles.clj
{: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}}}}}
此用户配置文件在 lein 执行期间与所有项目配置文件合并。
查找此类信息的好地方是 annotated sample profile在 lein 的 github 上。
关于clojure - Leiningen:如何自定义 .m2 文件夹的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12579335/