I am starting to use sbt build my Scala code (and handle dependencies). As far as I know if I use
$ sbt run <args>
on the command line this will run the main class of the main project.
Is it possible to 'run' within any other project from the command line, i.e. not in the interactive session mode? (I'm thinking about something that might look like $ sbt project <proj> run <args>
or whatever...)
What I would do in interactive mode is this:
$ sbt > project <projectname> > run <args>
This seems to be straightforward enough, but I can not find any documentation describing this behavior. Hints would be much appreciated...
You simply have to quote each command (as in the second example on this page), so in your case it would be:
$ sbt "project foo" "run arg1 arg2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With