Scala Casbah MongoDB驱动程序 - Maven错误

时间:2014-03-15 08:06:14

标签: mongodb scala casbah

在Maven中设置Casbah MongoDB驱动程序的正确方法是什么?当我尝试运行Maven构建时出现以下错误,我收到以下错误:

[ERROR] The following artifacts could not be resolved: org.mongodb:casbah_2.10:jar:2.5.1, com.novus:salat-core:jar:1.9.2: Failure to find org.mongodb:casbah_2.10:jar:2.5.1 in https://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of oss-sonatype-releases has elapsed or updates are forced -> [Help 1]

我已经添加了maven依赖项和repo位置,但是看看Maven应该从哪里获取jar文件的以下URL,它似乎不存在!

https://oss.sonatype.org/content/repositories/releases/org/mongodb/casbah_2.10/2.5.1/

设置此选项的正确方法是什么。拥有如此多的存储库而没有任何jar文件真是令人沮丧。

1 个答案:

答案 0 :(得分:0)

casbah主项目有一个描述所有依赖项的pom文件。正如您在此处所见:https://oss.sonatype.org/content/repositories/releases/org/mongodb/casbah_2.10/2.5.1/casbah_2.10-2.5.1.pom

通常,您的构建工具应该能够读取pom并获取依赖项。