1) 从 下载 sbt 1.2.0
2)解压 sbt 1.2.0.zip 到 D:\tools\mysbt
3)配置环境变量
SBT_HOME=D:\tools\mysbt\sbt
PATH=....; D:\tools\mysbt\sbt\bin
4)在 D:\tools\mysbt\sbt\conf\sbtconfig.txt 配置文件
# Set the java args to high
-Xmx512M
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=128m
# Set the extra SBT options
-Dsbt.log.format=true
-Dsbt.boot.directory=D:/tools/mysbt/data/.sbt/boot
-Dsbt.global.base=D:/tools/mysbt/data/.sbt
-Dsbt.ivy.home=D:/tools/mysbt/data/.ivy2
-Dsbt.repository.config=C:/Users/Administrator/repo.properties
-Dsbt.repository.secure=false
5) 在C:/Users/Administrator/repo.properties配置如下:
[repositories]
local
aliyun public:
typesafe-ivy-releases: [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
[ext]
maven-central
sonatype-snapshots:
6)在cmd命令行执行 sbt,创建本地库文件。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9606353/viewspace-2895365/ ,如需转载,请注明出处,否则将追究法律责任。