0

I want to run this SBT command in Ammonite:

sbt -mem 3000 clean compile docker:publishLocal

I tried a few things like:

%.sbt("-mem 3000", 'clean, 'test)(pwd)

Which gives this exception:

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

How is this done?

pme
  • 14,156
  • 3
  • 52
  • 95

1 Answers1

1

I recently had to the same thing, and i can tell you that is not fun when those "random" errors happen.

// 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)

with this the solution is:

%.sbt("-mem", "3000", 'clean, 'test)(pwd)
pme
  • 14,156
  • 3
  • 52
  • 95
Pedro Correia Luís
  • 1,085
  • 6
  • 16
  • thanks - with your answer - this works: `%.sbt("-mem", "3000", 'clean, 'test)(pwd)`. If you add this to your answer I can accept it;). – pme Jul 30 '19 at 12:54