Is there a maven plugin to create a runnable jar which extract all used classes from the dependent libraries?
The main reason I need this is the following: I developed a Java Web Start Application and if I creat the jar with shade plugin or jar plugin the JAR will be >13MB or the shade-plugin even forgets some classes which results in ClassNotFoundException.
With my old ant script the JAR is only 1,3MB small, it contains all required classes and it is downloaded and started really fast. But to go with technology I would like to switch to maven. Thanks a lot!
My current pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<shadedClassifierName>min</shadedClassifierName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
What do I need to add for example the apache chemistry opencmis libraries (now the classes will be extracted but as I said some classes are still missing which opencmis uses itselfe)?