mongodbscalacasbah

Can't resolve casbah as a sbt dependency


I'm getting the following error upon compile:

[error] (*:update) sbt.ResolveException: unresolved dependency: org.mongodb#casbah_2.11;2.7.4-SNAPSHOT: not found

With this build.sbt file:

name := """play-scala"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
  ws
)

libraryDependencies += "org.mongodb" %% "casbah" % "2.7.4-SNAPSHOT"

// For stable releases
resolvers += "Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases"

// For SNAPSHOT releases
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

I'm using Typesafe Activator and have tried many combinations of Casbah versions (including releases, instead of snapshots) and resolvers. The installation instructions from the "official" MongoDB Casbah tutorial don't work either. Any ideas?


Solution

  • If you go to the release and snapshot URLs and try to manually locate casbah, you'll see that the snapshot url doesn't have anything for casbah currently.

    On the other hand, the release repo has 2.7.3 for Scala 2.11. Check it out here.

    Maybe try

    libraryDependencies += "org.mongodb" %% "casbah" % "2.7.3"