【问题标题】:Java Play 2 - Compile error -> HerokuJava Play 2 - 编译错误 -> Heroku
【发布时间】:2012-08-08 01:14:46
【问题描述】:

我正在尝试将我的应用程序部署到 heroku,但我总是收到相同的错误消息,我不知道如何修复它。

我做了一些谷歌搜索但没有成功。我还尝试更改 sbt 的版本。它也可以完美运行

play run

我正在使用 Play 2.0.2。

有什么解决办法吗?

[info] Loading project definition from /tmp/build
     [warn]   module not found: play#sbt-plugin;2.0
     [warn] ==== typesafe-ivy-releases: tried
     [warn]   http://repo.typesafe.com/typesafe/ivy-re
    .9.1/sbt_0.11.3/2.0/ivys/ivy.xml
     [warn] ==== local: tried
     [warn]   /tmp/build_2gxtp2n2ct352/.sbt_home/.ivy2
    .9.1/sbt_0.11.3/2.0/ivys/ivy.xml
     [warn] ==== Typesafe repository: tried
     [warn]   http://repo.typesafe.com/typesafe/releas
    3/2.0/sbt-plugin-2.0.pom
     [warn] ==== heroku-sbt-typesafe: tried
     [warn] ==== heroku-central: tried
     [warn]   http://s3pository.heroku.com/maven-centr
    3/2.0/sbt-plugin-2.0.pom
     [warn] ==== typesafe: tried
     [warn]   http://repo.typesafe.com/typesafe/repo/p
    0/sbt-plugin-2.0.pom
     [warn] ==== heroku-sbt-typesafe: tried
     [warn] ==== heroku-central: tried
     [warn]   http://s3pository.heroku.com/maven-centr
    3/2.0/sbt-plugin-2.0.pom
     [warn] ==== typesafe: tried
     [warn]   http://repo.typesafe.com/typesafe/repo/p
    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
    these dependencies exist with the requested attrib
     [warn]           play:sbt-plugin:2.0 (sbtVersion=

     [warn]
     [error] {file:/tmp/build_2gxtp2n2ct352/project/}d
    solveException: unresolved dependency: play#sbt-pl
     Project loading failed: (r)etry, (q)uit, (l)ast,
    build app with sbt
     Heroku push rejected, failed to compile Play 2.0

    @heroku.com:pure-chamber-6292.git
    mote rejected] master -> master (pre-receive hook
     failed to push some refs to 'git@heroku.com:pure-

【问题讨论】:

  • heroku 没有用户论坛吗??

标签: java deployment heroku playframework-2.0 sbt


【解决方案1】:

sbt-plugin 的版本号似乎有误。确保您的 project/plugins.sbt 文件包含:

// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.0.2")

【讨论】:

  • 我正在尝试从源代码构建 play-2.0-spring-module 并获得play#sbt-plugin;x.x: not found。我已经尝试过 2.0.2、2.0(这里提到的 playframework.org/documentation/2.0/Build)、2.0.1(这里提到的 github.com/oscarrenalias/play-2.0-spring-module/commit/…)。当我浏览这里时,我没有看到任何这些版本:repo.typesafe.com/typesafe/simple/releases/play/sbt-plugin。我对 maven 很熟悉,但对 sbt 一点也不熟悉,我一定是遗漏了一些小东西,有什么想法吗?
  • 啊,现在我看到 sbt-plugin 版本 2.0.2(和其他版本)列在 scala 版本 2.9.1 下。我的 sbt 显示它使用的是 scala 2.9.2,所以我猜这与它有关......
  • Play 2.0.x 构建应该都使用 Scala 2.9.1。你有没有把它切换到 2.9.2?
  • 我克隆了 play-2.0-spring-module 并尝试使用 sbt package 构建它。所以,sbt 正在从某个地方找到 scala 2.9.2,这一定是问题所在。我会尝试强制它使用 2.9.1。感谢您的帮助。
  • 啊。我以为您正在尝试构建一个 Play 应用程序。您可以通过将 scalaVersion := "2.9.1" 添加到构建设置来强制使用 Scala 版本。
猜你喜欢
  • 1970-01-01
  • 2015-06-22
  • 2011-05-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多