sbt-1-windows中安装及使用

    技术2026-09-20  4

    (1)下载及安装 下载地址https://www.scala-sbt.org/download.html 下载包为sbt-1.3.13.zip 解压到D盘即可D:\sbt (2)配置环境变量 path中添加D:\sbt\bin (3)配置D:\sbt\conf\sbtconfig.txt -Dsbt.log.format=true -Dsbt.boot.directory=D:/sbt/.sbt/boot -Dsbt.ivy.home=D:/sbt/.ivy2 -Dsbt.global.base=D:/sbt/.sbt -Dsbt.repository.config=D:/sbt/conf/repository.properties -Dsbt.repository.secure=false (4)配置D:\sbt\conf\repository.properties [repositories] local huaweicloud-maven: https://repo.huaweicloud.com/repository/maven/ maven-central: https://repo1.maven.org/maven2/ sbt-plugin-repo: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/artifact.[ext] 其余不用做任何更改 (5)创建sbt工程目录结构

    (6)以管理员身份打开CMD 进入工程目录结构 sbt compile编译项目 sbt run运行项目 sbt package打包项目

    Processed: 0.008, SQL: 9