java - Jar command not adding requested manifest file to archive -


i running following - , resulting manifest.mf not contain 1 referenced below:

jar -cvf instrument.jar -m instrument/meta-inf/manifest.mf -c instrument . 

here intended manifest.mf:

18:23:20/shared $ll instrument/meta-inf/manifest.mf -rw-r--r--  1 steve  staff  33 mar 31 17:57 instrument/meta-inf/manifest.mf 

here resulting jar file (notice incorrect date/size of manifest.mf)

18:34:02/shared $jar -tvf instrument.jar      0 tue mar 31 17:58:58 pdt 2015 meta-inf/     68 tue mar 31 17:58:58 pdt 2015 meta-inf/manifest.mf    544 tue mar 31 17:56:42 pdt 2015 objectsizefetcher.cl 

here contents of intended manifest:

18:36:39/shared $cat instrument/meta-inf/manifest.mf premain-class: objectsizefetcher 

here actual contents inside jar file:

8:35:38/x2 $cat meta-inf/manifest.mf manifest-version: 1.0 created-by: 1.7.0_25 (oracle corporation) 

you have list options, except -c first, arguments (yeah, know, original :)) , provide list of files include

jar -cvfm instrument.jar instrument/meta-inf/manifest.mf -c instrument . 

should want.


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -