1

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.

jiangok
  • 2,622
  • 3
  • 21
  • 26
  • 1
    Akka microkernel is is deprecated since 2.4. You could use ordinary main method. As an example you could take a look at https://github.com/akka/akka/blob/master/akka-kernel/src/main/scala/akka/kernel/Main.scala – kardapoltsev May 27 '15 at 12:53

0 Answers0