how to use sbt-native-packager JavaAppPackaging archtype for akka microkernel

336 Views Asked by At

akka microkernel archtype is deprecated per this link http://www.scala-sbt.org/sbt-native-packager/archetypes/akka_app/index.html. However, it is not clear to me how to use the recommended JavaAppPackaging archtype to create an akka microkernel app.

I tried

lazy val HelloKernel = Project(
  id = "hello-kernel",
  base = file("."),
  settings = defaultSettings ++ Seq(
    ...,
    mainClass in Compile := Some("sample.kernel.hello.HelloKernel")
  )
).enablePlugins(JavaAppPackaging) 

sample.kernel.hello.HelloKernel is derived from Bootable. The code of HelloKernel is mostly copied from http://doc.akka.io/docs/akka/2.1.0/scala/microkernel.html.

After compiling, when I "run" in sbt console, I got:

java.lang.NoSuchMethodException: sample.kernel.hello.HelloKernel.main

Why sbt is still looking for "main"? How can I make sbt know it is running an akka microkernel app instead of a regular java app? Thanks any hints.

0

There are 0 best solutions below