I know this is an ancient post, but I just made a small script to recursively explode an ear/war/jar/zip and thought it might be of use to someone finding this
thread.
#!/bin/sh
#
if [ ! "$1" ];
then
echo No ear file specified.
exit 1
fi
if [ ! -f "$1" ];
then
echo Specified file does not exist or is not a file.
exit 1
fi
if [ ! "$2" ];
then
echo No destination directory specified.
exit 1
fi
if [ ! -d "$2" ];
then
echo Destination directory does not exist or is not a directory.
exit 1
fi
unzip "$1" -d "$2"
find "$2" -type f -name "*.war" -exec mkdir "{}.exploded" ';'
find "$2" -type f -name "*.war" -exec "$0" '{}' "{}.exploded" ';'
find "$2" -type f -name "*.jar" -exec mkdir "{}.exploded" ';'
find "$2" -type f -name "*.jar" -exec "$0" '{}' "{}.exploded" ';'