Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check a signed jar file using Ant?

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?

like image 425
senzacionale Avatar asked May 20 '10 08:05

senzacionale


1 Answers

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.)

like image 188
VonC Avatar answered Sep 22 '22 17:09

VonC