创建不带SecurityException的fatJar

时间:2018-12-04 20:46:29

标签: java gradle build.gradle

我已经尝试了“Invalid signature file” when attempting to run a .jar中提出的解决方案,但仍然遇到问题。我的gradle有以下内容:

task jarWithDependencies(type: Jar) {
manifest {
    attributes 'Implementation-Title': 'Test',
            'Implementation-Version': version
}
zip64 = true
baseName = project.name + '-all'
archiveName = "$baseName.$extension"
from {
    configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
} {
    exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
}

with jar
}

问题是,当我运行它时,我得到以下输出:

log4j:WARN No appenders could be found for logger (com.test.Tester).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

然后程序退出。

0 个答案:

没有答案
相关问题