我刚从Play 2.2.0升级到2.2.2。执行此操作后,从我的项目中运行任何播放命令会导致在加载项目定义时挂起。在查看this问题后,我将logLevel
设置为Debug
以查看其悬挂的位置。它似乎总是挂在这个阶段:
[info] Resolving com.typesafe.play#routes-compiler_2.10;2.2.2 ...
[debug] sbt-chain: Checking cache for: dependency: com.typesafe.play#routes-compiler_2.10;2.2.2 {compile=[default(compile)]}
[debug] tried http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/routes-compiler_2.10/2.2.2/ivys/ivy.xml
[debug] CLIENT ERROR: Not Found url=http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/routes-compiler_2.10/2.2.2/ivys/ivy.xml
[debug] typesafe-ivy-releases: no ivy file found for com.typesafe.play#routes-compiler_2.10;2.2.2
[debug] tried http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/routes-compiler_2.10/2.2.2/ivys/ivy.xml
错误消息似乎是正确的,因为跟踪这些网址会给我一个not found
错误。
作为一个完整性检查,我还尝试创建一个全新的Java项目,其中有一个完全相同的行为。还有其他人经历过这个吗?
作为参考,这是我的build.sbt文件:
name := "appname"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
"postgresql" % "postgresql" % "9.1-901-1.jdbc4",
"org.apache.httpcomponents" % "httpclient" % "4.3.2",
"commons-codec" % "commons-codec" % "1.9",
"com.google.guava" % "guava" % "15.0",
"com.typesafe.play" %% "play-jdbc" % "2.2.0" exclude("com.jolbox", "bonecp"),
"com.jolbox" % "bonecp" % "0.8.0.RELEASE"
)
play.Project.playJavaSettings
我的build.properties文件:
sbt.version=0.13.0
和我的plugins.sbt文件:
// Comment to get more information during initialization
logLevel := Level.Debug
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.2")
答案 0 :(得分:4)
所以,事实证明,实际发生的事情似乎是播放出来(非常缓慢)从http://repo.typesafe.com/下载各种.jar文件
通过浏览器手动下载文件并将其放在
中的相关文件夹中 $play/repository/cache
似乎已经为我解决了这个问题。
答案 1 :(得分:1)