0

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

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]  ^

这是怎么做到的?

4

1 回答 1

1

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

// 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)
于 2019-07-30T12:43:35.150 回答