【问题标题】:play20 app (v. 2.0.2) deployment on heroku在 heroku 上部署 play20 应用程序 (v. 2.0.2)
【发布时间】:2012-06-27 17:36:55
【问题描述】:

尝试在 heroku 上运行 play 2.0.2 应用程序,但似乎还不支持。

有没有人遇到过这种情况?

错误:

          http://s3pository.heroku.com/maven-scala-tools-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.11.3/sbt_2.9.1-0.11.3.pom

      -- artifact org.scala-tools.sbt#sbt_2.9.1;0.11.3!sbt_2.9.1.jar:

      http://s3pository.heroku.com/maven-scala-tools-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.11.3/sbt_2.9.1-0.11.3.jar

        ::::::::::::::::::::::::::::::::::::::::::::::

        ::          UNRESOLVED DEPENDENCIES         ::

        ::::::::::::::::::::::::::::::::::::::::::::::

        :: org.scala-tools.sbt#sbt_2.9.1;0.11.3: not found

        ::::::::::::::::::::::::::::::::::::::::::::::



   :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
   unresolved dependency: org.scala-tools.sbt#sbt_2.9.1;0.11.3: not found
   Error during sbt execution: Error retrieving required libraries
     (see /tmp/build_7sg3kay36u6a/project/boot/update.log for complete log)
   Error: Could not retrieve sbt 0.11.3
 !     Failed to build app with SBT 0.11.0
 !     Heroku push rejected, failed to compile Scala app

【问题讨论】:

  • 这对我有用。您是升级 2.0.1 应用还是此应用是新应用?
  • 您是否通过设置sbt.version=0.11.3 正确更新了您的project/build.properties

标签: heroku playframework playframework-2.0


【解决方案1】:

这是因为旧缓存而发生的(我的应用之前已经部署在 heroku 上,因此是旧缓存)

从您的 play 应用程序的根目录执行

heroku config:add BUILDPACK_URL='https://github.com/heroku/heroku-buildpack-scala#cleancache'

然后再次推送您的应用程序

这将删除所有缓存的工件和 sbt jar 并重新下载最新的。

请记住在之后执行 heroku config:remove BUILDPACK_URL 或每次推送缓存时都会删除,构建需要一段时间。

向 scott @play googlegroups 致敬

https://groups.google.com/forum/#!topic/play-framework/yUDfW2UtBjs

【讨论】:

    【解决方案2】:

    这可能无关紧要,但我在 myhomedir/.sbt/plugins/build.sbt 中有一些冲突的插件,这搞砸了我的 Play 2.0.2 构建。删除它为我修复了它。

    【讨论】:

      【解决方案3】:

      我在我的 Mac 上遇到了这个确切的错误,这是因为 MacPorts 没有安装正确版本的 SBT(sudo port install sbt 给了我 0.11.2 而不是 0.11.3) - 是的,我更新了我的端口树。所以我 sudo port 卸载了 sbt 并使用了 brew install sbt。这个(Homebrew)安装了 0.11.3 并且问题消失了。我建议在 Heroku 上检查 sbt 版本。

      【讨论】:

        【解决方案4】:

        如果您在 play 2.0.4 上遇到这个问题(我知道,这个问题是针对 play 2.0.2 的,但它是在 google 上的第一个问题): 将 sbt 版本更改为 0.11.3: 将 project/build.properties 中的 sbt 版本更改为 0.11.3

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2011-12-05
          • 2017-09-26
          • 2018-03-29
          • 1970-01-01
          • 2016-10-01
          • 2018-09-10
          • 2012-04-11
          相关资源
          最近更新 更多