javamavenonejar

OneJar includes Dr Tuffs classes


I expect this is trivial, but I'm on a deadline, so I apologise if this is a stupid question.

I'm using Dr Tuffs OneJar for Maven to build a fat jar including all my dependencies etc. However, when I use jar tf xxx.one-jar.jar it lists the things I'd expect, like my normal jar, but also all of Dr Tuffs code. The below is just an excerpt from the command:

com/
com/simontuffs/
com/simontuffs/onejar/
.version
OneJar.class
com/simontuffs/onejar/Boot$1.class
com/simontuffs/onejar/Boot$2.class
com/simontuffs/onejar/Boot$3.class
com/simontuffs/onejar/Boot.class
com/simontuffs/onejar/Handler$1.class

I'm hoping there's a property I can set in my pom file to stop it doing this.


Solution

  • Check this link you have to add the one-jar jar as excluded in Maven pom.xml file.