Could not find artifact org.mongodb:casbah_2.10:jar:2.7.0-RC1 in oss-sonatype (


Problem 1

When including casbah via maven:


get the following error:

[ERROR] Failed to execute goal on project ... : Could not resolve dependencies for project ... : Could not find artifact org.mongodb:casbah_2.10:jar:2.7.0-RC1 in oss-sonatype (https

Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.mongodb:casbah_2.10:jar:2.7.0-RC1 in oss-sonatype (


Need to specify pom type explicitly:


Also need to add repo:




NOTE: You may need to flash out old dependencies by

mvn clean install -U -X

Problem 2

In the beginning I was actually trying to include the sbt project into maven project; by adding to build.sbt:

publishTo := Some(Resolver.file("file",  new File(Path.userHome.absolutePath+"/.m2/repository")))

Everything was building fine (with “sbt publish”); but when I was trying to include the project in maven it would give the same error as in (Problem 1).

After a lot of digging around; the solution was to explicitly use pomOnly mode for the casbah dependency in build.sbt:

libraryDependencies += “org.mongodb” %% “casbah” % “2.7.0-RC1”pomOnly()




maven sbt casbah error mongo mongodb

Searched for casbah maven 7:05am
  Maven Repository: org.mongodb » casbah-core_… –
Searched for maven clean cache 6:50pm
  Force maven update – Stack Overflow – 6:50pm
earched for mongo casbah maven sonatype 6:48pm
Searched for maven add sonatype repository 6:33pm
  robolectric – How do you import a Maven… – 6:34pm
Searched for org.mongodb:casbah maven 6:29pm
  Casbah Maven dependency FAILS in Eclipse… – 6:30pm
Searched for maven Failure to find org.mongodb:casbah_2.10 6:28pm
  Scala Casbah MongoDB driver – Maven error… – 6:28pm
  2.3. Alternative installation methods… – – Viewed 5 times 6:29pm
Searched for mongo casbah maven 6:21pm
  Maven Repository: org.mongodb » casbah-core_… –
Searched for maven force update command line 1:16pm
  Maven: Command to update repository after… – 1:16pm
Searched for org.mongodb:casbah_2.10 1:13pm
  Maven Repository: org.mongodb » casbah_2.10 – 1:14pm
Searched for sbt deploy to maven repository 12:47pm
  Publishing — sbt Documentation – 12:47pm
Searched for maven use artifact from ivy 12:45pm
  Publishing multiple artifacts to maven… – 12:46pm
  How to download artifacts from ivy repository… – 12:46pm
Searched for maven using sbt 12:44pm
  shivawu/sbt-maven-plugin · GitHub –
Searched for how to sbt to be usable by maven 12:44pm
Searched for maven use local ivy 12:41pm
  How to make Maven use an ivy repository… – 12:42pm
  How to use the ivy local repository as… – 12:42pm
Searched for maven use sbt publish-local 12:40pm
Searched for maven sbt publish-local 12:39pm
  maven – Publish SBT project to local… – 12:40pm
Searched for sbt publish local maven 12:38pm
  Publishing — sbt Documentation – 12:38pm
Searched for sbt organization 12:35pm
  Naming the Scala build file — sbt Documentation – 12:36pm
Searched for maven scala version 12:33pm
  Maven Repository: org.scala-tools »… – 12:33pm





About Neil Rubens

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *