Heroku添加sbt start插件可防止sbt插件解析

时间:2013-02-04 21:20:40

标签: scala heroku playframework-2.0 sbt

添加sbt-start插件以推送到Heroku时,通过build.sbt添加以下内容:

resolvers += Classpaths.typesafeResolver

addSbtPlugin("com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.3")

我得到一个未解决的依赖玩法:

[warn]  module not found: play#sbt-plugin;2.0.4
[warn] ==== local: tried
[warn]   /Users/david-grandes/.ivy2/local/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.0.4/ivys/ivy.xml
[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.4/ivys/ivy.xml
[warn] ==== Typesafe repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.2_0.12/2.0.4/sbt-plugin-2.0.4.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/play/sbt-plugin_2.9.2_0.12/2.0.4/sbt-plugin-2.0.4.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: play#sbt-plugin;2.0.4: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

考虑到如果我们删除sbt-start-plugin,我们实际上可以找到没有问题的播放插件,这很奇怪。

修改

也许它与这个特定版本的插件有关? https://github.com/sbt/sbt-start-script/issues/23

1 个答案:

答案 0 :(得分:0)

删除sbt-start-plugin可以找到play#sbt-plugin;2.0.4,这很奇怪,因为我认为play#sbt-plugin;2.0.4only available for Scala 2.9.1 and SBT 0.11.3。也许当您添加sbt-start-plugin时,您还更改了Scala或SBT版本?

尽管如此,与将其他Scala Web框架部署到Heroku不同,sbt-start-plugin不需要将Play 2.0应用程序部署到Heroku,因为Play 2.0 already includes the required stage task因此部署到Heroku应该可以开箱即用。如果您使用全新的Play 2.0应用程序,则无需任何修改即可将其部署到Heroku。