powered by Jive Software

Compile whack 2.0 with all dependencies


#1

When whack is downloaded and compiled via eclipse, despite declaring all dependencies as “compile” the generated jar still requires all external libraries to run.

For a specific applications, we require that all jar dependencies are packed together.

We followed the instructions here as an alternative, to no effect -> Deliver Your Java Application in One-JAR™ ! , https://code.google.com/p/onejar-maven-plugin/

Can anybody direct us how to compile whack within eclipse or maven and include all dependencies in the produced JAR file? We searched the fora and we did not find a working solution.


#2

You can use the maven-shade-plugin or maven-assembly-plugin for this. But generally it’s a bad idea to merge all jars into one, because jar files can have the same files, which would get overridden then. I.e. when each jar has a META-INF/somefile.properties, only one is taken.


#3

I used the assembly plugin but it requires the main class invocation method. Which one is it?

We only want to do this with Whack library/Jar for purely internal administrative and procedural reasons.