As macport provides different scala versions, I use scala-select to set up my scala default version: 2.9.0
$ sudo port select scala scala29
Unfortunately macport provides an old sbt version, so I proceed with a manual installation. Just copy to jar file to the desired location, I chose /usr/share/sbt, and create a shell script to launch it:
You can find a very basic project in my github account to test it:
As the scalatra website recommends, I installed giter8 via conscript.
$ cd
$ curl https://raw.github.com/n8han/conscript/master/setup.sh | sh
$ ~/bin/cs n8han/giter8
At this point the installation failed because it couldn’t find commons-logging dependency, so I added that dependency to my basic sbt project and it was available next time I rerun the giter8 installation. Now you can create a scalatra template running:
Scalatra on OSX Lion
This post aims to describe my first steps with scalatra and sbt on a macbook running OSX Lion.
I installed scala using macports
$ sudo port install scala29As macport provides different scala versions, I use scala-select to set up my scala default version: 2.9.0
$ sudo port select scala scala29Unfortunately macport provides an old sbt version, so I proceed with a manual installation. Just copy to jar file to the desired location, I chose /usr/share/sbt, and create a shell script to launch it:
/usr/share/sbt
├── bin
│ └── sbt
└── lib
│ └── sbt-launch.jar
And the sbt script content:
java -Dfile.encoding=UTF8
-Xmx1536M
-Xss1M
-XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=256m
-jar /usr/share/sbt/lib/sbt-launch.jar "$@"
Finally I created a symlink to the sbt script
$ ln -s /usr/share/bin/sbt /usr/bin/sbt
You can find a very basic project in my github account to test it:
As the scalatra website recommends, I installed giter8 via conscript.
$ cd
$ curl https://raw.github.com/n8han/conscript/master/setup.sh | sh
$ ~/bin/cs n8han/giter8
At this point the installation failed because it couldn’t find commons-logging dependency, so I added that dependency to my basic sbt project and it was available next time I rerun the giter8 installation. Now you can create a scalatra template running:
$ ~/bin/g8 scalatra/scalatra-sbt