Imre Tokai wrote:Thank you for your answers!
And is there any chance to do this with Maven or any OneJar app?
I am looking around, but still haven't find any working solution. It's more elegant to have only one app.jar file, than to have app.jar file and additional lib folder.
I'm also thinking about obfuscating code later...
Regards
Take a look at the Maven
Maven Assembly Plugin. Specifically you will want to look at the
jar-with-dependencies Predefined Assembly Descriptor. The
usage page has some discussion on it.
Java 7 is going to be introducing the concept of a Java Module (JAM) -- see
JSR 277 -- which will basically deal with this as well. A JAM will apparently be a super-set of JARs. So you'll put your JARs in your JAM rather than your jam in jars like
Smuckers does ;)