简体   繁体   English

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

[英]Heroku adding sbt start plugin prevents sbt plugin from resolving

When adding the sbt-start plugin to push to Heroku, via build.sbt with the following contents: 在添加sbt-start插件以通过build.sbt将其推送到Heroku时,其内容如下:

resolvers += Classpaths.typesafeResolver

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

I get an unresolved dependency with play: 我得到了一个无法解决的依赖关系:

[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]  ::::::::::::::::::::::::::::::::::::::::::::::

Which is weird considering that if we remove the sbt-start-plugin, we can actually find the play plugin with no problems. 考虑到如果删除sbt-start-plugin,实际上可以找到没有问题的play插件,那是很奇怪的。

EDIT 编辑

Maybe its related to this specific version of the plugin? 也许与此特定版本的插件有关? https://github.com/sbt/sbt-start-script/issues/23 https://github.com/sbt/sbt-start-script/issues/23

It is odd that removing the sbt-start-plugin allows play#sbt-plugin;2.0.4 to be found because I believe that play#sbt-plugin;2.0.4 is only available for Scala 2.9.1 and SBT 0.11.3 . 奇怪的是,删除sbt-start-plugin可以找到play#sbt-plugin;2.0.4 ,因为我相信play#sbt-plugin;2.0.4 仅适用于Scala 2.9.1和SBT 0.11.3 Perhaps when you added sbt-start-plugin you also changed the Scala or SBT version? 也许当您添加sbt-start-plugin ,还更改了Scala或SBT版本吗?

Nonetheless, unlike deploying other Scala web frameworks to Heroku, the sbt-start-plugin should not be necessary to deploy a Play 2.0 application to Heroku because Play 2.0 already includes the required stage task so deployment to Heroku should work out of the box. 但是,与将其他Scala Web框架部署到Heroku有所不同,将Play 2.0应用程序部署到Heroku并不需要sbt-start-plugin ,因为Play 2.0已经包含了必需的stage任务,因此部署到Heroku时应该可以立即使用。 If you take a fresh Play 2.0 app, you can deploy it to Heroku without any modifications. 如果您使用全新的Play 2.0应用程序,则无需进行任何修改即可将其部署到Heroku。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM