one-jar remove verbose warning information on application load

后端 未结 9 2118
一个人的身影
一个人的身影 2021-02-19 17:18

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 eve

9条回答
  •  醉梦人生
    2021-02-19 17:55

    Regarding the latest-and-greatest One-Jar v0.97: The problem is there. The 'one-jar.properties' file actually needs to be put into the root of the final jar. It will, of course, have one line that reads, one-jar.silent=true. This can be done in Ant by setting something like inside the task.

    It can also, just as easily, be placed into the command line using the java -Done-jar.silent=true -jar foo-jar-made-by-one-jar.jar command.

    Nevertheless, it will still report a single line that it's loading properties from the One-Jar internal Boot class before going quiet. There is no way to get around this without changing source code starting at line 317 in Boot.java where the method initializeProperties logs the loading/merging operations. See Bug ID 3609329 at SourceForge in the One-Jar bug tracker where I provided the quick fix.

    Summary: By adding the one-jar.properties file all but one line of extraneous logging is removed. This should help Maven users find a workaround.

提交回复
热议问题