使用类型安全激活器运行Scala应用程序时出错

使用类型安全激活器运行Scala应用程序时出错,scala,typesafe-activator,typesafe,typesafe-stack,Scala,Typesafe Activator,Typesafe,Typesafe Stack,当我尝试使用Typesafe Activator运行应用程序时,出现以下错误: Loading main class information... launching discoveredMainClasses task Loading project definition from /project_path/project /project_path/build.sbt:7: error: not found: value EclipseKeys EclipseKeys.createSrc

当我尝试使用Typesafe Activator运行应用程序时,出现以下错误:

Loading main class information...
launching discoveredMainClasses task
Loading project definition from /project_path/project
/project_path/build.sbt:7: error: not found: value EclipseKeys
EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource
^
Type error in expression
怎么了?这是我的build.properties:

sbt.version=0.13.1
和build.sbt:

import com.typesafe.sbt.SbtStartScript

seq(SbtStartScript.startScriptForClassesSettings: _*)

seq(com.github.retronym.SbtOneJar.oneJarSettings: _*)

EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource

EclipseKeys.withSource := true

testOptions in Test += Tests.Argument("-oF")

libraryDependencies += "commons-lang" % "commons-lang" % "2.6"

name := "myproject"

version := "1.0"

scalaVersion := "2.10.3"

添加到您的项目/plugin.sbt:

addSbtPlugin("com.typesafe.sbt" % "sbt-start-script" % "0.10.0")

addSbtPlugin("org.scala-sbt.plugins" % "sbt-onejar" % "0.8")
更新:

Activator有自己的文件“Activator sbt eclipse shim.sbt” 它包括:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")
从plugin.sbt中删除“com.typesafe.sbteclipse”%“sbteclipse plugin”

我把它改为2.4.0,问题就解决了。但在重新启动activator后,它将再次恢复2.3.0-但该错误不再发生


然后我为eclipse/idea生成了项目。这两个版本都取得了成功。

它已经存在了,但在我的例子中,只有一个jar版本是0.7。但不管怎样,它没有起作用…:-(我来这里是想弄明白为什么在Activator中生成Idea项目文件时会出现类似上述错误。我最终从project/plugin.sbt中删除了Eclipse插件。