-
Notifications
You must be signed in to change notification settings - Fork 8
Using SBT
- Create a shell script called "sbt" (optionally: somewhere in your path) with the following in it (note, some settings like the mesos path and the heap size (-Xmx) should but customized for your setup):
#!/bin/bash
java -noverify -Djava.library.path=/usr/local/mesos/lib/java -Xmx7G -XX:MaxPermSize=3G \
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -jar `dirname $0`/sbt-launch.jar "$@"- download
sbt-launchfrom http://cs.berkeley.edu/~marmbrus/tmp/sbt-launch.jar and put it into the same directory as the above sbt script - try it out by running sbt while in the top level directory of SCADS
NOTE: If you get an error that looks like the following, you should delete ~/.m2/repository and ~/.ivy2/cache, and try again.
:: problems summary ::
:::: WARNINGS
[NOT FOUND ] org.scala-lang#scala-compiler;2.8.0!scala-compiler.jar (76ms)SBT commands can either be run one at a time by running sbt <command> or from the an sbt shell which can be invoked by running sbt by itself. The shell supports tab completion and successive commands will take advantage of JIT and thus run faster. Unlike with maven all sbt commands should be run from the root of the SCADS checkout, regardless of which subproject you are working on.
-
update- download all managed dependencies jars, note in contrast to maven this must be run explicitly. -
projects- list all of the available subprojects -
project <subproject name>- switch to the specified subproject, subsequent commands will be run only on this project and its dependencies -
clean- delete class files for the current subproject and all dependent sub-projects -
compile- build the current project -
write-packaged-classpath- build jars for the current subproject and all of its dependencies, then output two files classpath and allJars that contain the absolute path to the current subprojects jars and all of its dependencies. These files are used by the shell scripts described below. -
run- run the mainclass for the current subproject, if there are multiple choices you will be prompted for which one you want to run -
test- run the testcases for the current subproject and all its dependencies
Any of the above commands can be prefixed with a tilde (ex: ~compile). SBT will then rerun the command anytime any sourcefile is changed.
Note the following scripts rely on the presence of the classpath and alljars files which are produced by running write-packaged-classpath
-
bin/mvnconsole- starts up a scala console -
bin/assembly- builds an uberjar of the current subproject and all its dependencies. the output file will be names scads.jar