Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jarsigner manifest permissions

How can you add additional parameters to a jar's manifest file when signing it? I have a javaws app that uses some external libraries. Starting with java7u25 there is a need for additional parameters in the manifest (permissions and codebase). How can I set these at signing (with maven if possible). I can set it at build time for the artifacts I produce but for the ones I get from the external repositories how can I insert them at signing time?

like image 365
Sorin Dabiste Avatar asked Jun 27 '13 08:06

Sorin Dabiste


2 Answers

I update the 3rd party jars prior to signing them. The ant task for updating the jar is:

jar ufm thirdparty.jar manifest_adder.mf

  • u: update

  • f: output to file

  • m: manifest file attached.

The manifest_adder.mf file will be merged with the existing manifest in the 3rd party jar.

like image 136
Traksewt Avatar answered Sep 30 '22 13:09

Traksewt


Important observation:

Note: The contents of the manifest must be encoded in UTF8.

I lost a lot of time because of that. Hope this help someone.

like image 24
Saeger Avatar answered Sep 30 '22 14:09

Saeger