'why sbt-assembly failed to auto detect main class?
I have a Boot object with below definition
object Boot extends App with xxxService {}
And add below lines in plugins.sbt to enable sbt-assembly
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
then run this command to build up the whole project:
sbt clean compile assembly
In the genearted jar META-INF/MAINFEST.MF file, it does not have Main-Class generated, if I specify main class in build.sbt like mainClass in assembly := Some("com.XXX.Boot"), it worked.
My sbt version is 1.3.2, jvm is zulu8, scala is 2.12.13
From enter link description here it says, sbt-assembly will autodetect main class, then how does my example failed?
Solution 1:[1]
I update sbt-assembly into below
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")
it can auto detect the main class without specify in build.sbt...
I guess this is might be related with sbt and scala verion... my colleague can run the config in the question correctly...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | LizzyMM |
