Java Playframework 2.3.9 heroku上的sbt构建在导入时失败

Java Playframework 2.3.9 heroku上的sbt构建在导入时失败,java,scala,heroku,playframework,sbt,Java,Scala,Heroku,Playframework,Sbt,我正在尝试将我的play 2.3.9应用程序部署到heroku。更新和下载LIB后,sbt在出现奇怪的导入错误时失败,错误消息如下: remote: [info] Compiling 1 Scala source to /tmp/scala_buildpack_build_dir/project/target/scala-2.10/sbt-0.13/classes... remote: /tmp/scala_buildpack_build_dir/modules/ad

我正在尝试将我的play 2.3.9应用程序部署到heroku。更新和下载LIB后,sbt在出现奇怪的导入错误时失败,错误消息如下:

remote:        [info] Compiling 1 Scala source to /tmp/scala_buildpack_build_dir/project/target/scala-2.10/sbt-0.13/classes...
remote:        /tmp/scala_buildpack_build_dir/modules/admin/build.sbt:0: error: not found: object $34400878e902ee641868
remote:        import $34400878e902ee641868._
remote:               ^
remote:        [error] Type error in expression
remote:        Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 
remote:  !     ERROR: Failed to run sbt!
该应用程序使用了3个子模块,分别是admin、common和web,显然在admin模块的build.sbt文件中出现了故障

管理模块的build.sbt文件部分由根模块的“project”文件夹中托管的名为common.scala的公共scala对象生成。此公共对象由管理、公共和web子模块使用,以共享公共构建属性

管理员的build.sbt:

Common.moduleSettings("admin")

lazy val common = (project in file("../common")).enablePlugins(PlayJava)

lazy val root = (project in file(".")).enablePlugins(PlayJava).enablePlugins(SbtWeb).dependsOn(common).aggregate(common)

Keys.fork in (Test) := false

libraryDependencies ++= Common.commonDependencies
Common.scala文件:

import sbt._
import sbt.Keys._
import play.PlayImport._
import com.typesafe.sbt.web.SbtWeb.autoImport.{Assets, pipelineStages}
import com.typesafe.sbt.less.Import.LessKeys
import com.typesafe.sbt.rjs.Import.{rjs, RjsKeys}
import com.typesafe.sbt.digest.Import.digest

object Common {
  def appName = "lcdp-1"

  // Common settings for every project
  def settings (theName: String) = Seq(
    name := theName,
    organization := "com.lcdp",
    version := "1.0-SNAPSHOT",
    scalaVersion := "2.11.6",
    doc in Compile <<= target.map(_ / "none"),
    scalacOptions ++= Seq("-feature", "-deprecation", "-unchecked", "-language:reflectiveCalls"),
    resolvers += "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
    resolvers += "release repository" at  "http://hakandilek.github.com/maven-repo/releases/",
    resolvers += "snapshot repository" at "http://hakandilek.github.com/maven-repo/snapshots/"
  )
  // Settings for the app, i.e. the root project
  val appSettings = settings(appName) ++: Seq(
    javaOptions += s"-Dconfig.resource=root.conf"
  )
  // Settings for every module, i.e. for every subproject
  def moduleSettings (module: String) = settings(module) ++: Seq(
    javaOptions += s"-Dconfig.resource=$module.conf"
  )
  // Settings for every service, i.e. for admin and web subprojects
  def serviceSettings (module: String) = moduleSettings(module) ++: Seq(
    includeFilter in (Assets, LessKeys.less) := "*.less",
    excludeFilter in (Assets, LessKeys.less) := "_*.less",
    pipelineStages := Seq(rjs, digest),
    RjsKeys.mainModule := s"main-$module"
  )

  val commonDependencies = Seq(
    javaJdbc,
    cache,
    javaWs,
    javaEbean,
    "com.newrelic.agent.java" % "newrelic-agent" % "3.7.0",
    "be.objectify" %% "deadbolt-java" % "2.3.3",
    "com.typesafe.play" %% "play-mailer" % "2.4.1",
    ...
  )
导入sbt_
导入sbt.Keys_
导入play.PlayImport_
导入com.typesafe.sbt.web.SbtWeb.autoImport.{Assets,pipelineStages}
导入com.typesafe.sbt.less.import.LessKeys
导入com.typesafe.sbt.rjs.import.{rjs,RjsKeys}
导入com.typesafe.sbt.digest.import.digest
对象公用{
def appName=“lcdp-1”
//每个项目的通用设置
def设置(名称:字符串)=序号(
名称:=名称,
组织机构:=“com.lcdp”,
版本:=“1.0-快照”,
scalaVersion:=“2.11.6”,

编译中的文档事实上,我的应用程序在编译之前需要清理。执行
heroku配置:set SBT_clean=true
将强制SBT在编译之前清理heroku上的工件。这已经解决了问题。

尝试使用foreman在本地运行它?您在
项目/build.properties
中配置了什么版本的SBTo、 可能想检查你的
模块/admin/build.sbt
是否有多余的字符。但看起来sbt做了一些奇怪的事情。我刚刚添加了一些关于build.sbt文件是如何生成的解释。sbt版本为0.13.5我建议升级sbt。