首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Ammonite中添加参数来运行SBT?

如何在Ammonite中添加参数来运行SBT?
EN

Stack Overflow用户
提问于 2019-07-30 20:32:07
回答 1查看 77关注 0票数 0

我想在Ammonite中运行这个SBT命令:

代码语言:javascript
复制
sbt -mem 3000 clean compile docker:publishLocal

我尝试了一些方法,比如:

代码语言:javascript
复制
%.sbt("-mem 3000", 'clean, 'test)(pwd)

这给出了这个例外:

代码语言:javascript
复制
[error] Expected symbol
[error] Not a valid command: -
[error] Expected end of input.
[error] Expected '--'
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected 'addPluginSbtFile'
[error] -mem 3000
[error]  ^

这是怎么做的?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-30 20:43:35

我最近做了同样的事情,我可以告诉你,当这些“随机”错误发生时,这并不有趣。

代码语言:javascript
复制
// I had to put the full path where sbt is, like this
val SBT = "C:\\Program Files (x86)\\sbt\\bin\\sbt.bat"

%(SBT, "-mem", "3000", "clean", "compile", "docker:publishLocal")(pwd)

因此,解决方案是:

代码语言:javascript
复制
%.sbt("-mem", "3000", 'clean, 'test)(pwd)
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57271771

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档