sbt / sbt-onejar

Packages your project using One-JAR™
MIT License
268 stars 45 forks source link

How to disable warnings on launch of produced jar? #9

Closed kaesler closed 12 years ago

kaesler commented 12 years ago

I've used the sbt-onejar plugin to package my app as single jar. When I invoke it using "java -jar my-jar.jar" I get tons of warnings like these:

JarClassLoader: Warning: JDOMAbout$Author.class in lib/jdom-1.1.jar is hidden by lib/jdom-1.0.jar (with different bytecode) JarClassLoader: Warning: JDOMAbout$Info.class in lib/jdom-1.1.jar is hidden by lib/jdom-1.0.jar (with different bytecode) JarClassLoader: Warning: JDOMAbout.class in lib/jdom-1.1.jar is hidden by lib/jdom-1.0.jar (with different bytecode) JarClassLoader: Warning: org/jdom/adapters/AbstractDOMAdapter.class in lib/jdom-1.1.jar is hidden by lib/jdom-1.0.jar (with different bytecode) JarClassLoader: Warning: org/jdom/adapters/CrimsonDOMAdapter.class in lib/jdom-1.1.jar is hidden by lib/jdom-1.0.jar (with different bytecode)

Is there some way to turn this noise off?

retronym commented 12 years ago

You should either organize your build to avoid duplicates of the same dependency on the classpath. For help with OneJAR itself, you should try over here: http://one-jar.sourceforge.net/