Java – how to use ant to check signed jar files?

I use ant signjar task to sign the jar file, and now I want to test it before deployment

I can check

jarsigner -verify sbundle.jar

But I don't know if I can do the same thing with ant?

Solution

Another approach is to build Maven - based scripts

If this is not a valid possibility, you can still use exec ant task to directly call the jarsigner command If the return code is set correctly, you can add the property failonerror (if the command exits with a return code other than 0, stop the build process.)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>