Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala 如何添加参数以在Ammonite中运行SBT?_Scala_Sbt_Ammonite - Fatal编程技术网

Scala 如何添加参数以在Ammonite中运行SBT?

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

我想在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] 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)
。如果你把这个加在你的答案上,我可以接受。