sbt-2-IDEA中配置创建scala项目sbt打包

(1)windows中安装任意版本的sbt

sbt-2-IDEA中配置创建scala项目sbt打包

(2)配置两个文件

sbt-2-IDEA中配置创建scala项目sbt打包

注意sbtconfig.txt中的参数,IDEA中配置需要使用

repository.properties sbtconfig.txt
[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](-[classifier]).[ext]

# sbt configuration file for Windows

# Set the java args

#-mem 1024 was added in sbt.bat as default

-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m

# Set the extra sbt options

# -Dsbt.log.format=true
-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

 

 

 

(3)全局设置

sbt-2-IDEA中配置创建scala项目sbt打包

设置如下

sbt-2-IDEA中配置创建scala项目sbt打包

 

sbt-2-IDEA中配置创建scala项目sbt打包

(4)创建scala的sbt项目

sbt-2-IDEA中配置创建scala项目sbt打包

注意

sbt-2-IDEA中配置创建scala项目sbt打包