I'm currently using sbt-native-packager to generate a start script for my scala application. I'm using packageArchetype.java_application
. I create the script in sbt:
sbt clean myproject/stage
and then "install" the application by copying the created lib
and bin
directories to the installation directory. I'm not distributing it to anyone, so I'm not creating an executable jar or tarball or anything like that. I'm just compiling my classes, and putting my jar and all the library dependency jars in one place so the start script can execute.
Now I want to add a second main class to my application, so I want a second start script to appear in target/universal/stage/bin
when I run sbt stage
. I expect it will be the same script but with a different name and app_mainclass
set to the different class. How would I do this?