我在本地存储库中的Maven依赖项遇到问题。
SBT找不到它。已将日志级别设置为调试,但未获取任何新内容。
这些文件在存储库中。我将粘贴路径从控制台复制到文件资源管理器,它们在那里。
输出:
[debug] trying file://c:/Users/userz/.m2/repository/com/twitter/naggati/2.0.0/naggati-2.0.0.pom
[debug] tried file://c:/Users/userz/.m2/repository/com/twitter/naggati/2.0.0/naggati-2.0.0.pom
[debug] Local Maven Repository: resource not reachable for com/twitter#naggati;2.0.0: res=file://c:/Users/userz/.m2/repository/com/twitter/naggati/2.0
.0/naggati-2.0.0.pom
[debug] trying file://c:/Users/userz/.m2/repository/com/twitter/naggati/2.0.0/naggati-2.0.0.jar
[debug] tried file://c:/Users/userz/.m2/repository/com/twitter/naggati/2.0.0/naggati-2.0.0.jar
[debug] Local Maven Repository: resource not reachable for com/twitter#naggati;2.0.0: res=file://c:/Users/userz/.m2/repository/com/twitter/naggati/2.0
.0/naggati-2.0.0.jar
[debug] Local Maven Repository: no ivy file nor artifact found for com.twitter#naggati;2.0.0
编辑:我使用scala文件在project / build中添加了路径,如http://code.google.com/p/simple-build-tool/wiki/LibraryManagement中所述
“如果将sbt添加为资源库,它可以搜索您的本地Maven资源库:”
val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
这使sbt在本地存储库中看起来。之前没有。
因此,scala文件如下所示:
import sbt._
class Foo(info: ProjectInfo) extends DefaultProject(info) {
val mavenLocal = "Local Maven Repository" at "file://c:/Users/userz/.m2/repository"
}
(我对Path.userHome进行了硬编码,以排除可能的错误原因。正如预期的那样,它什么都没有改变)。