4

我正在尝试在我的新环境 Windows 8 上编译 Play 2.0.4 上的现有项目。

在解决依赖关系时,Play 找不到javax.ws.rs#jsr311-api;1.1.1!jsr311-api.jar.

这是错误代码:

[info] Updating {file:/C:/Users/Test/Documents/Projects/Test/}test...
[info] downloading http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.6.1/slf4j-api-   1.6.1.jar ...
[info]  [SUCCESSFUL ] org.slf4j#slf4j-api;1.6.1!slf4j-api.jar (918ms)
[warn]  [NOT FOUND  ] javax.ws.rs#jsr311-api;1.1.1!jsr311-api.jar (275ms)
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar
[info] downloading http://repo.typesafe.com/typesafe/releases/play/play-test_2.9.1/2.0.3/play-test_2.9.1-2.0.3.jar ...
[info]  [SUCCESSFUL ] play#play-test_2.9.1;2.0.3!play-test_2.9.1.jar (2751ms)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: javax.ws.rs#jsr311-api;1.1.1!jsr311-api.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: javax.ws.rs#jsr311-api;1.1.1!jsr311-api.jar
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:124)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:123)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:110)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:110)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:98)
    at sbt.IvySbt.liftedTree1$1(Ivy.scala:47)
    at sbt.IvySbt.action$1(Ivy.scala:47)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:56)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:75)
    at xsbt.boot.Locks$GlobalLock.withChannelRetries$1(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:79)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:51)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:51)
    at xsbt.boot.Locks$.apply0(Locks.scala:30)
    at xsbt.boot.Locks$.apply(Locks.scala:27)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:56)
    at sbt.IvySbt.withIvy(Ivy.scala:95)
    at sbt.IvySbt.withIvy(Ivy.scala:91)
    at sbt.IvySbt$Module.withModule(Ivy.scala:110)
    at sbt.IvyActions$.update(IvyActions.scala:123)
    at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:816)
    at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:814)
    at sbt.Classpaths$$anonfun$44$$anonfun$45.apply(Defaults.scala:830)
    at sbt.Classpaths$$anonfun$44$$anonfun$45.apply(Defaults.scala:828)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$44.apply(Defaults.scala:832)
    at sbt.Classpaths$$anonfun$44.apply(Defaults.scala:827)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:834)
    at sbt.Classpaths$$anonfun$36.apply(Defaults.scala:734)
    at sbt.Classpaths$$anonfun$36.apply(Defaults.scala:732)
    at sbt.Scoped$$anonfun$hf7$1.apply(Structure.scala:478)
    at sbt.Scoped$$anonfun$hf7$1.apply(Structure.scala:478)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:41)
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.scala:295)
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.scala:295)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$5.work(System.scala:67)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:221)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:221)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:227)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221)
    at sbt.CompletionService$$anon$1$$anon$2.call(CompletionService.scala:26)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
[error] {file:/C:/Users/Test/Documents/Projects/Test/}test/*:update: sbt.ResolveException: download failed: javax.ws.rs#jsr311-api;1.1.1!jsr311-api.jar

如何解决?

4

1 回答 1

0

依赖项位于 Sonatype OSS 快照存储库中:

resolvers +=
  "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

将其添加到目录下的构建定义中project

阅读解析器以熟悉 SBT/Play 中解析器的概念(Play 在幕后使用 SBT)。

于 2014-01-21T23:09:17.833 回答