Scala 如何添加参数以在Ammonite中运行SBT?
我想在Ammonite中运行此Scala 如何添加参数以在Ammonite中运行SBT?,scala,sbt,ammonite,Scala,Sbt,Ammonite,我想在Ammonite中运行此SBT命令: sbt -mem 3000 clean compile docker:publishLocal 我尝试了以下几种方法: %.sbt("-mem 3000", 'clean, 'test)(pwd) 这就是例外: [error] Expected symbol [error] Not a valid command: - [error] Expected end of input. [error] Expected '--' [error] Expe
SBT
命令:
sbt -mem 3000 clean compile docker:publishLocal
我尝试了以下几种方法:
%.sbt("-mem 3000", 'clean, 'test)(pwd)
这就是例外:
[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] ^
这是怎么做到的?我最近也做了同样的事情,我可以告诉你,当那些“随机”错误发生时,这并不有趣
// 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)
有了这一点,解决方案是:
%.sbt("-mem", "3000", 'clean, 'test)(pwd)
谢谢-有了你的答案-这是有效的:
%.sbt(“-mem”,“3000”,“clean”,“test”)(pwd)
。如果你把这个加在你的答案上,我可以接受。