在Akka微内核中指定主类时编译错误?

时间:2013-04-08 21:31:15

标签: scala akka microkernel

这是我Build.scala中的项目定义。当我运行sbt runsbt 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
    )
  )

关于问题根源的任何想法?谢谢!

1 个答案:

答案 0 :(得分:2)

我们发现问题是您忘记导入丢失的设置,如:

import akka.sbt.AkkaKernelPlugin.distMainClass