Reputation: 1739
It's very common for me to create an sbt project that depends on an external jar and is intended to be run with a Main method from the external jar. At the moment, I just run it using "run-main xxx" but I'd much prefer to be able to include the Main method in the list of run() options provided by sbt. Is there an easy way to do this? Or is the best option to include an sbt task that serves as an alias for run-main xxx?
Upvotes: 3
Views: 209
Reputation: 7019
The list of main classes is collected in discoveredMainClasses
and you can transform that to add your own explicitly:
discoveredMainClasses in Compile += "org.example.Main"
Upvotes: 6