Created
December 13, 2013 12:11
-
-
Save opyate/7943389 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt-get install openjdk-7-jdk curl | |
| [[ -e sbt-launch.jar ]] || curl -L -o sbt-launch.jar http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.1/sbt-launch.jar | |
| if [ -e dummy ] ; then | |
| echo "dummy project exists" | |
| else | |
| mkdir -p dummy/project | |
| echo 'sbt.version=0.13.1' > dummy/build.properties | |
| echo 'object MyApp extends App { println("hello sbt") }' > dummy/MyApp.scala | |
| # This works: | |
| echo 'addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.5.0")' > dummy/project/web.sbt | |
| # Neither of these work: | |
| # echo 'libraryDependencies += "com.earldouglas" %% "xsbt-web-plugin" % "0.5.0"' > dummy/project/plugins.sbt | |
| # echo 'libraryDependencies += "com.earldouglas" % "xsbt-web-plugin" % "0.5.0"' > dummy/project/plugins.sbt | |
| cat > dummy/project/Build.scala <<EOF | |
| import sbt._ | |
| import Keys._ | |
| object DummyBuild extends Build { | |
| lazy val root = Project( | |
| id = "dummy_project", | |
| base = file(".") | |
| ) | |
| lazy val sub = Project( | |
| id = "sub_project", | |
| base = file("sub") | |
| ) | |
| } | |
| EOF | |
| mkdir -p dummy/sub | |
| echo 'object MySubApp { def plusOne(i: Int) = i + 1 }' > dummy/sub/MySubApp.scala | |
| fi | |
| cd dummy | |
| SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M" | |
| java $SBT_OPTS -jar ../sbt-launch.jar "$@" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this on a clean Linux installation, e.g. saucy64 on a Vagrant instance.