gpt4 book ai didi

java - Jarsigner 签署 Corda 工作流程 jar 时出现重复条目​​错误

转载 作者:行者123 更新时间:2023-12-02 00:35:38 25 4
gpt4 key购买 nike

我尝试签署我的 Corda 工作流程 jar,并为其执行以下命令: jarsigner -keystore test_app_sign.jks -storepass password123 -keypass password123 tcw-workflows.jar test_app_alias

但我收到此错误: jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: META-INF/io.netty.versions.properties

当我再次运行以下命令时我的 jar jar tf workflows.jar | grep META-INF/io.netty.versions.properties我可以看到 5 META-INF/io.netty.versions.properties里面有文件。

当我运行以下命令来查看这些文件的内容

unzip -p tcw-workflows.jar META-INF/io.netty.versions.properties

我看到以下内容:

#Generated by netty-parent/pom.xml
#Fri, 08 Mar 2019 10:44:41 +0000

netty-resolver-dns.version=4.1.34.Final
netty-resolver-dns.buildDate=2019-03-08 10\:44\:41 +0000
netty-resolver-dns.commitDate=2019-03-08 08\:51\:34 +0000
netty-resolver-dns.shortCommitHash=ff7a9fa
netty-resolver-dns.longCommitHash=ff7a9fa091a8bf2e10020f83fc4df1c44098bbbb
netty-resolver-dns.repoStatus=clean
#Generated by netty-parent/pom.xml
#Fri, 08 Mar 2019 10:31:53 +0000

netty-codec-dns.version=4.1.34.Final
netty-codec-dns.buildDate=2019-03-08 10\:31\:53 +0000
netty-codec-dns.commitDate=2019-03-08 08\:51\:34 +0000
netty-codec-dns.shortCommitHash=ff7a9fa
netty-codec-dns.longCommitHash=ff7a9fa091a8bf2e10020f83fc4df1c44098bbbb
netty-codec-dns.repoStatus=clean
#Generated by netty-parent/pom.xml
#Fri, 08 Mar 2019 10:38:05 +0000

netty-codec-http2.version=4.1.34.Final
netty-codec-http2.buildDate=2019-03-08 10\:38\:05 +0000
netty-codec-http2.commitDate=2019-03-08 08\:51\:34 +0000
netty-codec-http2.shortCommitHash=ff7a9fa
netty-codec-http2.longCommitHash=ff7a9fa091a8bf2e10020f83fc4df1c44098bbbb
netty-codec-http2.repoStatus=clean
#Generated by netty-parent/pom.xml
#Fri, 08 Mar 2019 10:43:07 +0000

netty-handler-proxy.version=4.1.34.Final
netty-handler-proxy.buildDate=2019-03-08 10\:43\:07 +0000
netty-handler-proxy.commitDate=2019-03-08 08\:51\:34 +0000
netty-handler-proxy.shortCommitHash=ff7a9fa
netty-handler-proxy.longCommitHash=ff7a9fa091a8bf2e10020f83fc4df1c44098bbbb
netty-handler-proxy.repoStatus=clean
#Generated by netty-parent/pom.xml
#Fri, 08 Mar 2019 10:41:37 +0000

netty-codec-socks.version=4.1.34.Final
netty-codec-socks.buildDate=2019-03-08 10\:41\:37 +0000
netty-codec-socks.commitDate=2019-03-08 08\:51\:34 +0000
netty-codec-socks.shortCommitHash=ff7a9fa
netty-codec-socks.longCommitHash=ff7a9fa091a8bf2e10020f83fc4df1c44098bbbb
netty-codec-socks.repoStatus=clean

所以这些是不同的文件,我猜它们都需要存在,但事实上它们都具有相同的名称,这阻止了 jar 签名者对 jar 进行签名。有什么想法可以解决这个问题吗?

附注我的工作流程项目有一个依赖项 io.bluebank.braid:braid-corda:4.1.1我猜这依赖于 netty

最佳答案

尝试将以下内容添加到您的build.gradle中:

jar {
exclude '**/io.netty.versions.properties'
}

关于java - Jarsigner 签署 Corda 工作流程 jar 时出现重复条目​​错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57977589/

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