当我尝试使用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"
答案 0 :(得分:1)
添加到您的项目/ 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 - 问题解决了。但重启后激活器再次恢复2.3.0 - 但错误不再发生。
然后我为eclipse / idea生成了项目。两者都取得了成功。