To install sbt in OS X run brew install sbt
(requires the almighty Homebrew installed first).
Basic commands are the following:
Command | Action |
---|---|
Deletes all generated files (in the target directory) |
clean |
Compiles the main sources (in src/main/scala and src/main/java directories) |
compile |
Compiles and runs all tests | test |
Starts the Scala interpreter with a classpath including the compiled sources and all dependencies; to return to sbt, type :quit |
console |
Runs the main class for the project in the same virtual machine as sbt | run <argument>* |
Creates a jar file containing the files in src/main/resources and the classes compiled from src/main/scala |
package |
Displays detailed help for the specified command; if no command is provided, displays brief descriptions of all commands | help <command> |
Reloads the build definition (build.sbt , project/*.scala , project/*.sbt files); needed if you change the build definition |
reload |