Quick Start running example doesn't run
jastice opened this issue · 2 comments
jastice commented
I was trying to run the Quick Start example in the form
sbt run-main 'mypackage.myapp.WordCount input-files output'
But this will give the error:
[error] Not a valid command: run-main
[error] Expected whitespace character
[error] run-main
If I run it with the regular sbt syntax for this:
sbt 'run-main mypackage.myapp.WordCount input-files output'
... it will run, but only the first argument seems to be written to args.
etorreborre commented
Thanks for noticing this. The correct syntax is:
sbt "run-main mypackage.myapp.WordCount input-files output"
jastice commented
I did try that, and it starts, but still only passes a single argument. For instance when running
> sbt "run-main com.clueda.finance.semarunner.ScoobiExample inputfile outputfile"
a println(args)
will only show: ArrayBuffer(inputfile)
Another minor syntax error in the example: persist(counts.toTextFile(args(1))
is missing a )