tags:

views:

57

answers:

2

I am using Maven, with the one-jar pluggin, but when I run the one jar executable, I'm greeted with a wall of warnings, this is unacceptable for use

I've looked at every available resource on one-jar and see no instruction on how to keep the jar for spewing out tons of warnings when run, has anyone solved this?

JarClassLoader: Warning: META-INF/LICENSE.txt in lib/commons-io-1.4.jar is hidden by lib/commons-collections-3.2.1.jar (with different bytecode)
JarClassLoader: Warning: META-INF/NOTICE.txt in lib/commons-io-1.4.jar is hidden by lib/commons-collections-3.2.1.jar (with different bytecode)
JarClassLoader: Warning: META-INF/LICENSE.txt in lib/commons-lang-2.4.jar is hidden by lib/commons-collections-3.2.1.jar (with different bytecode)
JarClassLoader: Warning: META-INF/NOTICE.txt in lib/commons-lang-2.4.jar is hidden by lib/commons-collections-3.2.1.jar (with different bytecode)
+1  A: 

It seems that these messages are printed when running in "verbose" mode. What I don't get is that the verbose mode doesn't seem to be activated by default.

Anyway, could you try to set the one-jar.verbose system property to false when running your one-jar:

java -Done-jar.verbose=false -jar <one-jar.jar>
Pascal Thivent
I've looked very deeply into this problem, you're absolutely correct, unfortunately the state of this project is that the maven plug-in doesn't allow you to specify the version of the dependent code, so the source you see isn't the actual source that is executed by the plugin... someone needs to recreate this plug-in the right way because there are problems in the source versions that are included that have been fixed, but there is no way to get to them through maven. I ended up getting an old version to avoid these very annoying system outs, but then spring stuff is broken, so pick my poison
walnutmon
@walnutmon From your description, things don't look good :S
Pascal Thivent
A: 

There is no way to do this without modifying the source code

walnutmon