我遇到了在我的本地存储库中的maven依赖项的问题。SBT在本地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的文件在工程/建造像http://code.google.com/p/simple-build-tool/wiki/LibraryManagement
“SBT描述可以搜索你的本地仓库,如果你将其添加为添加的路径一个存储库:“
val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
这使sbt看起来在本地存储库。之前没有。
所以斯卡拉文件看起来像这样:
import sbt._
class Foo(info: ProjectInfo) extends DefaultProject(info) {
val mavenLocal = "Local Maven Repository" at "file://c:/Users/userz/.m2/repository"
}
(我硬编码Path.userHome排除可能出现的错误的原因正如预期并没有改变任何东西。)。
你必须在本地Maven回购添加到您的build.sbt – leedm777
信息库中添加,否则该脚本将不看那里的文件。 – Ixx
告诉sbt寻找你的依赖的那一行是如何的?如果您有类似... - >默认设置,请从中删除默认设置。 – fmpwizard