【发布时间】:2014-04-28 02:36:23
【问题描述】:
我是 Play Framework 的新手,无法添加托管依赖项。
Play 版本是 2.2.2,sbt 是 0.13.0。
在下面的示例中,我尝试“管理”/下载(?)Apache Derby 库,但我也尝试了其他几个和许多不同的解析器。该库最终成为未解决的依赖项。
我在http://www.playframework.com/documentation/2.2.2/SBTDependencies 中阅读了有关管理依赖项的信息。
我已经尝试了一堆不同的库,并确保它们可以访问并且解析器是正确的。问题不在于防火墙/代理,因为我是通过直接连接到互联网进行测试的。
build.sbt 的设置如下(我尝试了所有可以想象的变化):
name := "kursguiden"
version := "1.0-SNAPSHOT"
resolvers += "Maven Central" at "http://repo1.maven.org/maven2/"
resolvers += "mvnrepository" at "http://mvnrepository.com/artifact/"
libraryDependencies ++= Seq(
"org.apache.derby" % "derby" % "10.4.1.3",
javaJdbc,
javaEbean,
cache
)
play.Project.playJavaSettings
和 plugins.sbt:
// Comment to get more information during initialization
logLevel := Level.Warn
// 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")
当我运行 play update 或 play run 时,我在播放控制台中收到以下错误消息:
[kursguiden] $ update
[info] Updating {file:/C:/play/kursguiden/}kursguiden...
[info] Resolving org.scala-lang#scala-library;2.10.3 ...
[info] Resolving org.apache.derby#derby;10.4.1.3 ...
[error] Server access Error: Connection timed out: connect url=http://repo1.mave
n.org/maven2/org/apache/derby/derby/10.4.1.3/derby-10.4.1.3.pom
[error] Server access Error: Connection timed out: connect url=http://repo1.mave
n.org/maven2/org/apache/derby/derby/10.4.1.3/derby-10.4.1.3.pom
[error] Server access Error: Connection timed out: connect url=http://mvnreposit
ory.com/artifact/org/apache/derby/derby/10.4.1.3/derby-10.4.1.3.pom
.
.
.
[info] Resolving commons-io#commons-io;2.4 ...
[info] Resolving org.scala-lang#scala-compiler;2.10.3 ...
[info] Resolving org.scala-lang#jline;2.10.3 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
warn] ::::::::::::::::::::::::::::::::::::::::::::::
warn] :: UNRESOLVED DEPENDENCIES ::
warn] ::::::::::::::::::::::::::::::::::::::::::::::
warn] :: org.apache.derby#derby;10.4.1.3: not found
warn] ::::::::::::::::::::::::::::::::::::::::::::::
trace] Stack trace suppressed: run last *:update for the full output.
error] (*:update) sbt.ResolveException: unresolved dependency: org.apache.derby
derby;10.4.1.3: not found
error] Total time: 422 s, completed 2014-mar-20 23:11:27
这只是一个尝试过的例子。在这个问题上花了最后 8 个小时 :)
您认为可能是什么问题?我可以通过浏览器访问所有文件,所以我的线索是某处一定有一些奇怪的设置。
【问题讨论】:
标签: playframework sbt