I\'m using maven for building my jar (Intellij IDEA IDE). It is app built using Apache Camel. An excerpt from my pom.xml:
The maven-shade-plugin creates a jar with your application code and all dependencies merged into a single jar file. The problem with this approach is that you need to decided what to do with files with conflicting names. This is the configuration we use to build executable JARs for our Camel apps, including Spring and all required dependencies.
org.apache.maven.plugins
maven-shade-plugin
1.5
org.apache.camel.spring.Main
META-INF/spring.handlers
META-INF/spring.schemas
META-INF/spring.tooling
META-INF/cxf/bus-extensions.txt
META-INF/INDEX.LIST
META-INF/MSFTSIG.SF
META-INF/MSFTSIG.RSA
package
shade