I have an SBT project that contains multiple classes with main
, i.e. MyClass extends App
. One-jar works fine when there is only one such class. If it finds multiple classes it prompts me to choose which one I want to package:
> one-jar
Multiple main classes detected, select one to run:
[1] com.smth.AppOne
[2] com.smth.AppTwo
Enter number:
I'd like to configure one-jar to automatically package all main classes. In documentation it defines default main class as mainClass in run in Compile
, so it looks like it expects only one value.
If this is not possible I'm curious why not. :)
For now I can only think of some hacks like creating a surrogate project for each jar or setting a mainClass
in SBT each time before calling one-jar
(multiple times per build). These approaches obviously have their deficiencies.