我有一个使用Scala 2.10.3构建的Play 2.2.2应用程序。
这是我的Build.scala文件:
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "my-app"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
"com.typesafe" %% "play-plugins-redis" % "2.2.0"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
resolvers += Resolver.url("sbt-plugin-releases", new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("Typesafe repository", new URL("http://repo.typesafe.com/typesafe/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("pk11 repo", new URL("http://pk11-scratch.googlecode.com/svn/trunk"))
)
}
当我运行play idea
时,它会尝试获取我的依赖项,但是当它到达redis插件时会崩溃,这就是错误:
error] (*:update) sbt.ResolveException: unresolved dependency: org.sedis#sedis_2.10.0;1.1.1: not found
[error] Failed to obtain dependency classpath
我可以看到sbt试图在这里找到依赖关系:
[warn] ==== pk11 repo: tried
[warn] http://pk11-scratch.googlecode.com/svn/trunk/org.sedis/sedis_2.10.0/1.1.1/ivys/ivy.xml
我在此网址找到了我想要的实际jar文件:
http://pk11-scratch.googlecode.com/svn/trunk/org/sedis/sedis_2.10.0/1.1.1/
为什么SBT不会进入此目录并下载依赖项?有没有办法让它将依赖关系视为maven依赖?
在挖掘过程中,我也在play-plugin-redis库的Build.scala中找到了这个:
https://github.com/typesafehub/play-plugins/blob/master/redis/project/Build.scala
答案 0 :(得分:0)
它正在寻找常春藤风格的存储库。将解析器行更改为:
resolvers += "pk11 repo" at "http://pk11-scratch.googlecode.com/svn/trunk"