1、下载sbt的window版本对应的msi文件:https://www.scala-sbt/download.html
2、安装配置
运行安装文件直接下一步下一步直至安装完成
检查环境变量是否自动添加,没有添加自己手动添加下
如果需要自定义配置,则到此路径下按需求配置文件
在sbt\conf\sbtconfig.txt中末尾添加
-Dsbt.boot.directory=D:/program/sbt/data/.sbt/boot
-Dsbt.global.base=D:/program/sbt/data/.sbt
-Dsbt.ivy.home=D:/program/sbt/data/.ivy2
-Dsbt.repository.config=D:/program/sbt/conf/repo.properties
-Dsbt.repository.secure=false
# 设置代理
# -Dhttp.proxyHost=10.18.11.11
# -Dhttp.proxyPort=8080
# -Dhttp.proxyUser=xx
# -Dhttp.proxyPassword=xx
# -Dhttps.proxyHost=10.18.1111
# -Dhttps.proxyPort=8080
# -Dhttps.proxyUser=xx
# -Dhttps.proxyPassword=xx
如果有需要设置代理的话,将“#设置代理”下面的#号去掉,并添加相应的代理设置,#是注释。
设置阿里云镜像
国内的网络环境复杂,阿里云还挺好用的,在sbt\conf\下新建repo.properties文件,内容为:
[repositories]
local
aliyun: http://maven.aliyun/nexus/content/groups/public/
typesafe: http://repo.typesafe/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots
3、验证运行
打开cmd,输入sbt,第一次运行会提示build并下载一些东西,按提示输入 c 并回车继续运行,下载消耗时间看网络情况状态,sbt版本不同的话,最后的结果也可能不一样,但是只要配置和网络正常,最后都会进入sbt的控制台。
如果出现类似下面的结果则表明安装成功
输入:sbtVersion 验证一下
1、下载sbt的window版本对应的msi文件:https://www.scala-sbt/download.html
2、安装配置
运行安装文件直接下一步下一步直至安装完成
检查环境变量是否自动添加,没有添加自己手动添加下
如果需要自定义配置,则到此路径下按需求配置文件
在sbt\conf\sbtconfig.txt中末尾添加
-Dsbt.boot.directory=D:/program/sbt/data/.sbt/boot
-Dsbt.global.base=D:/program/sbt/data/.sbt
-Dsbt.ivy.home=D:/program/sbt/data/.ivy2
-Dsbt.repository.config=D:/program/sbt/conf/repo.properties
-Dsbt.repository.secure=false
# 设置代理
# -Dhttp.proxyHost=10.18.11.11
# -Dhttp.proxyPort=8080
# -Dhttp.proxyUser=xx
# -Dhttp.proxyPassword=xx
# -Dhttps.proxyHost=10.18.1111
# -Dhttps.proxyPort=8080
# -Dhttps.proxyUser=xx
# -Dhttps.proxyPassword=xx
如果有需要设置代理的话,将“#设置代理”下面的#号去掉,并添加相应的代理设置,#是注释。
设置阿里云镜像
国内的网络环境复杂,阿里云还挺好用的,在sbt\conf\下新建repo.properties文件,内容为:
[repositories]
local
aliyun: http://maven.aliyun/nexus/content/groups/public/
typesafe: http://repo.typesafe/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots
3、验证运行
打开cmd,输入sbt,第一次运行会提示build并下载一些东西,按提示输入 c 并回车继续运行,下载消耗时间看网络情况状态,sbt版本不同的话,最后的结果也可能不一样,但是只要配置和网络正常,最后都会进入sbt的控制台。
如果出现类似下面的结果则表明安装成功
输入:sbtVersion 验证一下