Mainクラスが複数あると、sbtでrun
すると候補が出てきて、その中から数字で選択しないといけません…。
> run
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
Multiple main classes detected, select one to run:
[1] playground.actor.example1.SimpleExample
[2] playground.actor.example2.ChatModelExample
[3] playground.actor.example3.ActorLoggingExample
[4] playground.basic.HelloWorld
これが地味にめんどくさいです。
そんなときはrunMain
を使いましょう。クラス名の補完も効いて便利です。
> runMain playground.basic.HelloWorld
[info] Running playground.basic.HelloWorld
Hello World!!!
[success] Total time: 0 s, completed 2015/08/13 12:28:31