未解决的依赖关系SBT org.scala-sbt#sbt_2.9.1; 0.12.1:未找到,播放示例

前端之家收集整理的这篇文章主要介绍了未解决的依赖关系SBT org.scala-sbt#sbt_2.9.1; 0.12.1:未找到,播放示例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图在Play 2.0框架中运行示例,但是当我去运行“play”或“sbt”时.

当我进入目录“/ samples / scala / helloworld”时,我执行“sbt”并获得:

  1. [info] Loading project definition from C:\src\Play20\samples\scala\helloworld\project
  2. [warn] module not found: play#sbt-plugin;2.0
  3. [warn] ==== typesafe-ivy-releases: tried
  4. [warn] http://repo.typesafe.com/typesafe/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
  5. [warn] ==== sbt-plugin-releases: tried
  6. [warn] http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
  7. [warn] ==== local: tried
  8. [warn] C:\Users\labra\.ivy2\local\play\sbt-plugin\scala_2.9.2\sbt_0.12\2.0\ivys\ivy.xml
  9. [warn] ==== Typesafe repository: tried
  10. [warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
  11. [warn] ==== public: tried
  12. [warn] http://repo1.maven.org/maven2/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
  13. [warn] ::::::::::::::::::::::::::::::::::::::::::::::
  14. [warn] :: UNRESOLVED DEPENDENCIES ::
  15. [warn] ::::::::::::::::::::::::::::::::::::::::::::::
  16. [warn] :: play#sbt-plugin;2.0: not found
  17. [warn] ::::::::::::::::::::::::::::::::::::::::::::::
  18. [warn]
  19. [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
  20. [warn] play:sbt-plugin:2.0 (sbtVersion=0.12,scalaVersion=2.9.2)
  21. [warn]
  22. sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
  23. at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
  24. . . .
  25.  
  26. at java.lang.Thread.run(Thread.java:722)
  27. [error] (*:update) sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
  28. Project loading Failed: (r)etry,(q)uit,(l)ast,or (i)gnore?
  29. [info] Loading project definition from C:\src\Play20\samples\scala\helloworld\project
  30. [warn] module not found: play#sbt-plugin;2.0
  31. [warn] ==== typesafe-ivy-releases: tried
  32. [warn] http://repo.typesafe.com/typesafe/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
  33. [warn] ==== sbt-plugin-releases: tried
  34. [warn] http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
  35. [warn] ==== local: tried
  36. [warn] C:\Users\labra\.ivy2\local\play\sbt-plugin\scala_2.9.2\sbt_0.12\2.0\ivys\ivy.xml
  37. [warn] ==== Typesafe repository: tried
  38. [warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
  39. [warn] ==== public: tried
  40. [warn] http://repo1.maven.org/maven2/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
  41. [warn] ::::::::::::::::::::::::::::::::::::::::::::::
  42. [warn] :: UNRESOLVED DEPENDENCIES ::
  43. [warn] ::::::::::::::::::::::::::::::::::::::::::::::
  44. [warn] :: play#sbt-plugin;2.0: not found
  45. [warn] ::::::::::::::::::::::::::::::::::::::::::::::
  46. [warn]
  47. [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
  48. [warn] play:sbt-plugin:2.0 (sbtVersion=0.12,scalaVersion=2.9.2)
  49. [warn]
  50. sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
  51. at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
  52. at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
  53. . . .
  54. at java.lang.Thread.run(Thread.java:722)
  55. [error] (*:update) sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
  56. Project loading Failed: (r)etry,or (i)gnore? q

我从http://www.scala-sbt.org/release/docs/Getting-Started/Setup安装了sbt版本12.1

我在这里注意到一个类似的问题:https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/DGUbWsgZiLw

在答案中,它似乎与SBT的“启动器”版本有关,我怎么知道这是我的启动器sbt版本?我该如何更新它?

我也尝试从源代码编译xsbt但是,当运行“sbt build-all”时,我得到:

  1. . . .
  2. [info] Reading library jar [C:\compi\jdk\jre\lib\rt.jar]
  3. [error] Error: Can't read [proguard.ClassPathEntry@73abdb5e] (Can't process class [com/oracle/net/Sdp$1.class] (Unsupported version number [51.0] for class format))
  4. [error] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
  5. [error] Use 'last' for the full log.

但是,我的问题不是编译xsbt,而是知道如何执行“Play的例子”

在新文件夹中运行“sbt sbt-version”时,我获得:

  1. [info] Set current project to default-85f41b (...)
  2. [info] 0.12.1
如果你看一下 project/plugins.sbt,你会发现它需要设置play.version系统属性
  1. addSbtPlugin("play" % "sbt-plugin" % Option(System.getProperty("play.version")).getOrElse("2.0"))

所以,你应该提供必要的play.version属性

  1. $sbt -Dplay.version=2.1-RC1

或者只是将plugins.sbt更改为

  1. addSbtPlugin("play" % "sbt-plugin" % "2.1-RC1")

猜你在找的设计模式相关文章