Search code examples
javaparametersmanifestjarsignerjava-web-start

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?


Solution

  • 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.