I am using sbt with the one-jar plugin, but when I run the one-jar executable that has been created I get a continuous stream of messages that look like the following:
JarClassLoader: Warning: net/liftweb/json/Formats$$anon$4.class in lib/lift-json_2.9.2-2.5-M3.jar is hidden by lib/lift-json_2.9.1-2.4.jar (with different bytecode)
JarClassLoader: Warning: net/liftweb/json/JsonParser$BoolVal$.class in lib/lift-json_2.9.2-2.5-M3.jar is hidden by lib/lift-json_2.9.1-2.4.jar (with different bytecode)
JarClassLoader: Warning: net/liftweb/json/TypeInfo.class in lib/lift-json_2.9.2-2.5-M3.jar is hidden by lib/lift-json_2.9.1-2.4.jar (with different bytecode)
JarClassLoader: Warning: net/liftweb/json/Meta$$anonfun$mappingOf$1.class in lib/lift-json_2.9.2-2.5-M3.jar is hidden by lib/lift-json_2.9.1-2.4.jar (with different bytecode)
I tried passing parameters to the jvm as suggested in a couple of the responses to one-jar remove verbose warning information on application load, but I continue to get the annoying warnings.
How does one turn-off these warnings when using sbt-onejar?
I am using the most recent version of sbt-onejar.
tl;dr There's no easy way to turn the messages off since they come from
System.err
.I know little about the plugin so I unzipped the
JarClassLoader
class as follows:In the class, at line 998 there's the call to
WARNING
method:The method
WARNING
is implemented as follows:It's led me to claim that turning it off is impossible (unless you can shut down the entire
System.err
that I don't know being possible).