gpt4 book ai didi

Gradle fat jar _遗漏_子 jar 中的 META-INF?

转载 作者:行者123 更新时间:2023-12-02 09:24:55 24 4
gpt4 key购买 nike

有没有办法从 Gradle fat jar 中省略某些路径。

我正在使用:

jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}

来自

http://docs.codehaus.org/display/GRADLE/Cookbook

如果可能的话,希望省略 META-INF 目录。

谢谢!米莎

最佳答案

我还没有对其进行广泛的测试,但这应该可以满足您的要求:

jar {
from configurations.compile.collect {
it.isDirectory() ? it : zipTree(it).matching{exclude{it.name == 'META-INF'}}
}
}

关于Gradle fat jar _遗漏_子 jar 中的 META-INF?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3081188/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com