Corda - CorDapp JAR 签名导致构建异常
Corda - CorDapp JAR Signing Causes Build Exception
我正在关注 these instructions 来签署我的 CorDapp,但它导致构建失败。这是我到目前为止所做的:
- 在以下目录中创建了密钥库
~/.gradle/keystore/jarsign.pkcs12
- 将以下行添加到
gradle.properties
jar.sign.keystore=~/.gradle/keystore/jarsign.pkcs12
jar.sign.password=NotMyRealPassword
- 将此添加到我的 CorDapp gradle 配置(变量)
ext {
cordapp_signing_enabled = true
cordapp_signing_alias = 'cordapp-signer'
cordapp_signing_storetype = 'PKCS12'
cordapp_signing_keystore = getProperty('jar.sign.keystore')
cordapp_signing_password = getProperty('jar.sign.password')
}
- 将此添加到我的 CorDapp gradle 配置(cordapp 签名)
signing {
enabled = cordapp_signing_enabled
options {
keystore cordapp_signing_keystore
alias cordapp_signing_alias
storepass cordapp_signing_password
keypass cordapp_signing_password
storetype cordapp_signing_storetype
}
}
当我尝试构建(从 IntelliJ 或终端)时,出现以下错误
Exception while signing contract-0.1.jar, ensure the 'cordapp.signing.options' entry contains correct keyStore configuration, or disable signing by 'cordapp.signing.enabled false'. Run with --info or --debug option and search for 'ant:signjar' in log output.
问题似乎是由于密钥存储路径是相对的
这没用...
jar.sign.keystore=~/.gradle/keystore/jarsign.pkcs12
...但这确实...
jar.sign.keystore=/Users/me/.gradle/keystore/jarsign.pkcs12
我正在关注 these instructions 来签署我的 CorDapp,但它导致构建失败。这是我到目前为止所做的:
- 在以下目录中创建了密钥库
~/.gradle/keystore/jarsign.pkcs12
- 将以下行添加到
gradle.properties
jar.sign.keystore=~/.gradle/keystore/jarsign.pkcs12
jar.sign.password=NotMyRealPassword
- 将此添加到我的 CorDapp gradle 配置(变量)
ext {
cordapp_signing_enabled = true
cordapp_signing_alias = 'cordapp-signer'
cordapp_signing_storetype = 'PKCS12'
cordapp_signing_keystore = getProperty('jar.sign.keystore')
cordapp_signing_password = getProperty('jar.sign.password')
}
- 将此添加到我的 CorDapp gradle 配置(cordapp 签名)
signing {
enabled = cordapp_signing_enabled
options {
keystore cordapp_signing_keystore
alias cordapp_signing_alias
storepass cordapp_signing_password
keypass cordapp_signing_password
storetype cordapp_signing_storetype
}
}
当我尝试构建(从 IntelliJ 或终端)时,出现以下错误
Exception while signing contract-0.1.jar, ensure the 'cordapp.signing.options' entry contains correct keyStore configuration, or disable signing by 'cordapp.signing.enabled false'. Run with --info or --debug option and search for 'ant:signjar' in log output.
问题似乎是由于密钥存储路径是相对的
这没用...
jar.sign.keystore=~/.gradle/keystore/jarsign.pkcs12
...但这确实...
jar.sign.keystore=/Users/me/.gradle/keystore/jarsign.pkcs12