tags:

views:

44

answers:

1

Can i check signed file with ant?

i sign jar files with http://ant.apache.org/manual/CoreTasks/signjar.html and now i want to test it before to deploy it.

I can chek with jarsigner -verify sbundle.jar

but i do not know if is possible with ant do that?

+2  A: 

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 buildprocess if the command exits with a returncode other than 0.)

VonC