I am trying to build an installer for a couple of Java Maven projects (using Eclipse). I would like to use maven assembly to produce a jar file (henceforth big-fat jar) which contains all the installation files (JARs + docs + others) as well as the installer JAR (the result of building the installer project). I want the installer to unpack the big-fat jar and therefore I want the main class to be included in the installer jar. The user will get the big-fat jar and I want java -jar big-fat.jar to execute the main inside installer.jar. To recap, here is the structure of the big-fat jar:
big-fat-jar:
--installer.jar
--application.jar
--readme.doc,
--META-INF:
----MANIFEST.MF
where installer.jar is the Java program which unpacks big-fat-jar and contains main, application.jar is the application being installed (there may be multiple jars or wars instead of just one application.jar) and readme.doc stands for any docs. My question is: what do I do to make the main inside installer.jar be called when the user executes java -jar big-fat-jar? I read on other posts that OneJar may be helpful but I am not sure how to indicate that main resides inside the inner jar.