首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未解析依赖SBT org.scala-sbt#sbt_2.9.1;0.12.1:未找到,播放示例

未解析依赖SBT org.scala-sbt#sbt_2.9.1;0.12.1:未找到,播放示例
EN

Stack Overflow用户
提问于 2012-12-06 14:09:34
回答 5查看 17.8K关注 0票数 7

我试图在Play 2.0框架中运行示例,但当我运行"play“或"sbt”时。

当我转到"/samples/scala/helloworld“目录时,我执行"sbt”并获得:

代码语言:javascript
复制
    [info] Loading project definition from C:\src\Play20\samples\scala\helloworld\project
[warn]  module not found: play#sbt-plugin;2.0
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\Users\labra\.ivy2\local\play\sbt-plugin\scala_2.9.2\sbt_0.12\2.0\ivys\ivy.xml
[warn] ==== Typesafe repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: play#sbt-plugin;2.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      play:sbt-plugin:2.0 (sbtVersion=0.12, scalaVersion=2.9.2)
[warn] 
sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
. . .

    at java.lang.Thread.run(Thread.java:722)
[error] (*:update) sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 
[info] Loading project definition from C:\src\Play20\samples\scala\helloworld\project
[warn]  module not found: play#sbt-plugin;2.0
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\Users\labra\.ivy2\local\play\sbt-plugin\scala_2.9.2\sbt_0.12\2.0\ivys\ivy.xml
[warn] ==== Typesafe repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/play/sbt-plugin_2.9.2_0.12/2.0/sbt-plugin-2.0.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: play#sbt-plugin;2.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      play:sbt-plugin:2.0 (sbtVersion=0.12, scalaVersion=2.9.2)
[warn] 
sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
. . .
    at java.lang.Thread.run(Thread.java:722)
[error] (*:update) sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, 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的" Launcher“版本有关,我如何知道我的Launcher sbt版本是什么?我该如何更新它呢?

我还尝试从源代码编译xsbt,但在运行"sbt build-all“时,我获得了:

代码语言:javascript
复制
    . . .
[info] Reading library jar [C:\compi\jdk\jre\lib\rt.jar]
[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))
[error] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
[error] Use 'last' for the full log.

然而,我的问题不是编译xsbt,而是知道如何执行"Play's examples“

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

代码语言:javascript
复制
[info] Set current project to default-85f41b (...)
[info] 0.12.1
EN

回答 5

Stack Overflow用户

发布于 2012-12-06 19:22:29

如果您查看project/plugins.sbt,您将看到它需要设置play.version系统属性:

代码语言:javascript
复制
addSbtPlugin("play" % "sbt-plugin" % Option(System.getProperty("play.version")).getOrElse("2.0"))

因此,您应该提供必要play.version属性

代码语言:javascript
复制
$ sbt -Dplay.version=2.1-RC1

或者简单地将plugins.sbt更改为

代码语言:javascript
复制
addSbtPlugin("play" % "sbt-plugin" % "2.1-RC1")
票数 6
EN

Stack Overflow用户

发布于 2013-10-09 09:30:57

适用于Activator 1.0用户的

在将项目加载到Activator1.0之后,当您将Play项目升级到更高版本的时,您可能会遇到此问题。这是因为Activator在/project目录中创建了类似于activator-...-shim.sbt的文件。删除这些文件,Activator应该会在下次编译时解决这个问题。

票数 4
EN

Stack Overflow用户

发布于 2012-12-19 07:36:33

切换到Play 2.1-RC1后问题解决了

我还遇到了一些依赖的问题,我解决了插入问题:

代码语言:javascript
复制
// The Typesafe snapshots repository
resolvers += "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/"

在plugins.sbt中

我只是在关注:https://github.com/playframework/Play20/wiki/Repositories

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13737926

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档