这是我Build.scala
中的项目定义。当我运行sbt run
或sbt dist
时,我得到not found: value distMainClass
的编译错误。因为我在2.0版本中检查了akka-microkernel-plugin项目以找到distMainClass
,所以非常烦人。我使用的是2.0.5,它也存在于2.1.0中。
lazy val ServiceKernel = Project(
id = "tracker-kernel",
base = file("."),
settings = defaultSettings ++ AkkaKernelPlugin.distSettings ++ Seq(
libraryDependencies ++= Dependencies.serviceKernel,
distJvmOptions in Dist := "-Xms512M -Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2",
outputDirectory in Dist := file("target/s.Tracker-dist"),
distMainClass in Dist := "namespace.ServiceKernel" //says not found
)
)
关于问题根源的任何想法?谢谢!
答案 0 :(得分:2)
我们发现问题是您忘记导入丢失的设置,如:
import akka.sbt.AkkaKernelPlugin.distMainClass