1. 使用环境变量COURSIER_CACHE,依据是https://github.com/coursier/coursier/blob/master/doc/docs/cache.md
export COURSIER_CACHE=some/dir
2. 使用java system property,依据是https://github.com/sbt/sbt/blob/v1.3.1/main/src/main/scala/sbt/coursierint/LMCoursier.scala#L40-L44
-Dsbt.coursier.home=some/path
如配置sbtconfig.txt时加入-Dsbt.coursier.home=some/path,或者在idea中做如下配置
我的repo.properties是下面这样配置的,其中uk、aliyun-central, repo1, store_2是重复的,把最快下载速度的url放到最前面去。