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

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

(2)配置两个文件

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

repository.propertiessbtconfig.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)全局设置

设置如下

(4)创建scala的sbt项目

注意

(5)IDEA 打包项目为jar包流程

新建工程名xinxin

新建scala对象名aa

打包完成会有目录out出现

首先File=>Project Structure=>Artifacts=>+=>JAR=>From module with dependencies

=>Module<All Modules>=>Main Class主类选aa即可=>ok=>ok

然后Build=>Build Artifacts=>Build

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

皮皮冰燃

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值