我想在SBT编译中执行任务,我尝试了runMain in compile
,但是它没有执行我提供的主类。以下是build.sbt
lazy val scalaGeneratorPlugin = Project("scala-generator", file("scala-generator"))
.settings(
libraryDependencies += "org.freemarker" % "freemarker" % "2.3.23",
runMain in compile := Some("com.my.MyMainClass")
)
我正在运行以下命令:
sbt scala-generator/compile
尽管它给了我success
消息,但它没有执行我的MainClass