I built a Spring Boot web app (using Eclipse/STS) that has an embedded tomcat server.
I need to do some (obfuscation) stuff to classes inside the WAR file and the zip it back up again, but before I try that I'm unzipping and then zipping up again to make sure that will work.
But when I unzip it then zip it back up it won't run anymore ...
Steps to reproduce:
Run the application like so ...
java -jar myapp.war
... it works fine. Kill the application."Un-zip" the war like so ...
jar -xf myapp.war
... all the contents are extracted.Delete the original war file ...
rm myapp.war
"Re-zip" the contents into a war like so ...
jar -cfv myapp.war .
Run the new war file ...
java -jar myapp.war
... I get an error ...
no main manifest attribute, in myapp.war
When I extract the contents of the new war file, I see that my original /META-INF/MANIFEST.MF file has been replaced by:
Manifest-Version: 1.0
Created-By: 1.7.0_06 (Oracle Corporation)
I'm probably doing something wrong on step (4) above. Any ideas? Is there a "Spring Boot"-specific thing I'm suppose to do?