Upon sbt run
I have multiple choices of main class.
I would like to set a main class so I've writen in build.sbt
:
mainClass := Some("aMainClass")
But sbt fails with:
build.sbt:1: error: not found: value aMainClass
I've also tried with project/Project.scala
file :
import sbt._
class ExecutableProject(info: ProjectInfo) extends DefaultProject(info) {
override def mainClass = Some("aMainClass")
}
error :
project/Project.scala:3: not found: type aMainClass
How to set the main class in a build?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…