【问题标题】:UNRESOLVED DEPENDENCIES due to Server access Error: Connection timed out: connect in Play 2.2.2?由于服务器访问错误导致未解决的依赖项:连接超时:在 Play 2.2.2 中连接?
【发布时间】: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 updateplay 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


    【解决方案1】:

    您的构建文件对我有用。 Server access Error: Connection timed out: connect 似乎是您的连接或服务器本身的临时网络问题。再试一次。

    您可能还想从 build.sbt 中删除以下 resolvers,因为我认为它们不需要(至少是最后一个):

    resolvers += "Maven Central" at "http://repo1.maven.org/maven2/"
    
    resolvers += "mvnrepository" at "http://mvnrepository.com/artifact/"
    

    【讨论】:

    • 感谢您的验证!你完全正确,显然我有一个“区域警报”进程仍在后台运行,但没有出现在系统托盘中。我以后绝对不会忘记检查的..
    猜你喜欢
    • 2016-04-13
    • 1970-01-01
    • 2015-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多