我尝试对我的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进行签名。有什么想法可以解决吗?
P.S。我的工作流程项目有一个依赖项io.bluebank.braid:braid-corda:4.1.1
,我猜它有一个对netty
的依赖项
答案 0 :(得分:0)
尝试将以下内容添加到您的build.gradle
:
jar {
exclude '**/io.netty.versions.properties'
}