Since the last Java update, I need to tag my applet jars manifest with the Trusted-Library
attribute to avoid warning popup when javascript is communicating wit
You can do that with the Maven JAR Plugin during the creation of the JAR file. Add the following to your pom.xml
:
org.apache.maven.plugins
maven-jar-plugin
false
true
org.apache.maven.plugins
maven-jarsigner-plugin
1.2
sign
sign
/path/to/testkeystore
myalias
test123
The main attributes as specified in the JAR File Specification are available as dedicated elements, e.g.:
org.apache.maven.plugins
maven-jar-plugin
false
true
true
true
See the Maven Archiver Reference for further information.
To modify the manifest inside an existing jar file create a text file, e.g. mymanifest.mf
which contains the required properties:
Trusted-Library: true
You can add the attributes of this file to an existing jar by executing the following command:
jar -cfm file-to-be-modified.jar mymanifest.mf
This will modify the manifest.mf
inside the given jar.