Java jars need the MANIFEST.MF file to be first in the archive

https://bugzilla.redhat.com/show_bug.cgi?id=465664
This commit is contained in:
Toshio Kuratomi 2012-10-03 17:30:10 -07:00 committed by Ville Skyttä
parent f40ecfaa06
commit be607b55f4

View File

@ -79,7 +79,10 @@ if [ ! -z "$JARS" ]; then
pushd $JARDIR > /dev/null
if [ -n "`find -not -name '.'`" ]; then
find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@
if [ -e META-INF/MANIFEST.MF ]; then
/usr/bin/zip -q -X -9 $j META-INF/MANIFEST.MF
fi
find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 $j -@
else
# Put the empty jar back
touch $j