12 December 2021

To be sure that a jar or war file built is a valid one, there is a command that come to the rescue:

RESULT=$(jar tvf myfile.jar > /dev/null 2&1)
echo $RESULT

RESULT should be:

Let's look at the options and argument used in jar tvf myfile.jar command:

This command could be used also to view the content of a jar or war file.

References