English 中文(简体)
我的蚂蚁标记器的任务 似乎正在更改我的密码
原标题:My ant signjar task seems to be changing my password

当我试图用这条线签署一个罐子时:

jarsigner -storetype pkcs12 -keystore cert_comodo.pfx MyJar.jar "le-01234567-0123-0123-0123-0123456789ab"

它促使我输入密码 一切正常 当我试图用这个蚂蚁目标签署时

<target name="sign_jars" depends="obfuscated_jar">
    <signjar 
            keystore="cert_comodo.pfx"
            alias="le-01234567-0123-0123-0123-0123456789ab"
            storepass="A, pa$$." <Not my real password or alias, btw>
            storetype="pkcs12">
        <path>
            <fileset dir="." includes="*.jar" />
        </path>
    </signjar>
</target>

我知道这个错误:

[signjar] jarsigner error: java.lang.RuntimeException: keystore load: failed t
o decrypt safe contents entry: javax.crypto.BadPaddingException: Given final blo
ck not properly padded

如果我错误地输入密码,我也会犯同样的错误。

我密码中的$ 字符是否正被Ant修改?是否有办法让我用互动方式输入密码? 谢谢!

问题回答

问题最有可能是由于 ant $ 视为逃逸的单项 $ ,从而将实际密码字符串作为 A, pa$ 传递给jarsigner。如果问题仍然相关,请尝试将密码更改为 A, 2 $ 的 pa$

https://ant.apache.org/ant_task_guidelines.html" rel=“nofollow”>Apache AntTM任务设计指南 提供的一些补充文件:

................. 在字符串中通过单美元符号 "$" ;..................... 在字符串中通过单美元符号 "$" ;....................





相关问题
i want to continously run my java threads

I am running my java application where i have used threads... i am running this application using ant command on the terminal.. But when i close my terminal or press ctrl+c,then java program which was ...

Subant targets instead of ant

I m having a problem with subant and have no ideas any more. Can anyone help? Using Ant to replace some strings for other (i.e Productname and Version for "Foo" and "1.2") I used ...

java ant buildfile for project with dependencies

I am new to ant, but am trying to create an ant script that builds my current proeject with another project as a dependency. I have the ant script building my current project, but am unsure how to add ...

Building Apache Hive - impossible to resolve dependencies

I am trying out the Apache Hive as per http://wiki.apache.org/hadoop/Hive/GettingStarted and am getting this error from Ivy: Downloaded file size doesn t match expected Content Length for http://...

Ivy, ant and start scripts

I have a project that uses ant to build and ivy for dependencies. I would like to generate the start scripts for my project, with the classpath, based on the dependencies configured in Ivy, ...

热门标签