sbt

MongoDB scala – CASBAH

Playing with scala/mongodb for fun. The docs for mongodb suggest that adding

val casbah = "com.novus" % "casbah_2.8.0" % "1.0.8.5"

to the build project should be enough to get casbah included in the current project. I get no end of errors when I attempt to use this. I used a popular web search tool to find that

val bumRels = "bum-releases" at "http://repo.bumnetworks.com/releases" 
val bumSnaps = "bum-snapshots" at "http://repo.bumnetworks.com/snapshots" 
val casbah = "com.novus" % "casbah_2.8.0" % "1.0.8.1"	

allows sbt to pull casbah in. I haven’t actually tried doing anything with it yet – mainly because I keep running back to the safe world of python or playing in the shell.

SBT – scalatest + jdbc

In the sbt project definition add the following to get scalatest and mysql drivers
(project file: project/build/ProjectName.scala)

import sbt._ 
 
class ProjectName(info: ProjectInfo) extends DefaultProject(info) { 
  val scalaToolsSnapshots = ScalaToolsSnapshots
  val scalatest = "org.scalatest" % "scalatest" % "1.0.1-for-scala-2.8.0.RC1-SNAPSHOT"
  val mysql = "mysql" % "mysql-connector-java" % "5.1.12" % "compile"
}

Then type sbt update

This should get scalatest & mysql up and running with SBT.