I sign jar files with the Ant signjar task and now I want to test before deploy.
I can check with
jarsigner -verify sbundle.jar
but I do not know if it is possible to do the same with Ant?
An alternative would be to base your build on a maven script.
Maven does propose the jarsigner:verify
plugin
If that is not a valid possibility, you still can use the Exec
Ant task to directly call the jarsigner
command.
If the return code is correctly set, you can add the attribute failonerror
(Stop the build process if the command exits with a return code other than 0.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With