to create a "myapp.jar" file. The jar was successfully generated. However, when I do
"jar -xvf myapp.jar" to unpack it, I saw the META-INF/ folder and its MANIFEST.MF fiel. The MANIFEST.MF is different from the original MANIFEST.MF I used for packing.
Do you know why and how I can ensure the MANIFESTY.MF is not changed ?
posted 5 years ago
The proper way to add a manifest is not to have a file in a META-INF directory, but to specify the file in a manifest attribute. The file can be anywhere and be named anything; Ant will package it properly.
Even better, you can keep the meta information in the build file (if you want):