idea sbt 修改默认仓库,想放哪放哪。
1.打开本地的sbt目录的conf
2.在sbtconfig.txt 配置文件末尾添加如下代码:
涉及到的路径修改为自己的路径。
-Dsbt.boot.directory=D:/Users/zbs/.sbt/boot
-Dsbt.global.base=D:/Users/zbs/.sbt
-Dsbt.ivy.home=D:/Users/zbs/.ivy2
-Dsbt.repository.config=D:\sbt\conf\repo.properties
4. repo.properties 文件内容:
----------------------------------------------------------------------------
[repositories]
local
comp-maven:http://mvnrepository.com/artifact/
store_cn:http://maven.aliyun.com/nexus/content/groups/public/
store_mir:http://mirrors.ibiblio.org/maven2/
store_0:http://maven.net.cn/content/groups/public/
store_1:http://repo.typesafe.com/typesafe/ivy-releases/
store_2:http://repo2.maven.org/maven2/
sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central: http://repo1.maven.org/maven2/
-------------------------------------------------------------------------------------------------
5.打开idea.
6.在2的位置写上自己想存放的目录。
-Dsbt.boot.directory=D:/Users/zbs/.sbt/boot
-Dsbt.global.base=D:/Users/zbs/.sbt
-Dsbt.ivy.home=D:/Users/zbs/.ivy2
-Dsbt.repository.config=D:\sbt\conf\repo.properties
7.点击ok完成设置。