As I found out, defining a main in sbt
0.12 and 0.13 seems different. My sbt
version is 0.12.2
. I have a few projects in one project. show compile:discovered-main-classes returns the list of the main classes of the project those have it (some of them doesn't have it because they are libraries).
Even in sbt 0.13
there are 2 approaches as you can see here how to set main class in SBT 0.13 project (I don't need those ones, though because I use 0.12.2
version)
I didn't specify a main class, therefore whenever I run run
I get an error:
java.lang.RuntimeException: No main class detected.
at scala.sys.package$.error(package.scala:27)
How do I specify a main class in a appropriate file in project
directory of the project?