【发布时间】:2018-11-20 17:25:19
【问题描述】:
我是 Scala 和 Play 框架 (2.6.x) 的新手。请参阅下面的git push heroku master 失败截图。
我需要 build.sbt 中的 jsoup 依赖项(第一个):
libraryDependencies += "org.jsoup" % "jsoup" % "1.11.3"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
并在我的控制器中使用它:
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
...
val res = scala.io.Source.fromURL(data.url)("ISO-8859-1").mkString
val s = Jsoup.parse(res).title
此外,我尝试通过将其添加到 lib/ 文件夹来将其用作 unmanaged dependency,但我仍然遇到相同的 Heroku 错误。
有趣的是,该应用程序在本地运行良好且没有错误。有什么我想念的吗?谢谢。
编辑:
【问题讨论】:
-
我在复制这个时遇到了麻烦。例如,当我将 Scala Play 应用程序推送到 Heroku 时,我看不到
compilePlatBinaryScala这样的东西。我的构建以remote: -----> Play 2.x app detected remote: -----> Installing JDK 1.8... done remote: -----> Running: sbt compile stage开头,你的呢?请发布整个构建日志。 -
你在使用 gradle 构建吗?
-
是的。我已经发布了上面的截图。
标签: scala heroku playframework