________________________________
From: Eric B <[email protected]>
Sent: Monday, November 13, 2017 5:51 PM
To: Maven Users List
Subject: Is there a plugin that allows me to modify existing jar manifest?

I'm looking to modify an existing third-party JAR's Manifest file in my
maven build.  Specifically, I have an Applet which has a dependency on
these third party jars, and need to add some entries/permissions to the
Manifest before I sign them for my Applet to use.

I'm looking to add the following:

                           <Permissions>all-permissions</Permissions>
                            <Codebase>*</Codebase>

<Application-Library-Allowable-Codebase>*</Application-Library-Allowable-Codebase>
                            <Trusted-Library>true</Trusted-Library>
                            <Application-Name>MyApp</Application-Name>

<Caller-Allowable-Codebase>*</Caller-Allowable-Codebase>

MG>Eric...did you try <archive> configuration parameter of maven-jar-plugin ?
https://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
Apache Maven JAR Plugin – Manifest 
customization<https://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html>
maven.apache.org
The default contents of the manifest is described in the documentation for 
Maven Archiver. Starting with version 2.1, the maven-jar-plugin uses Maven 
Archiver 3.1.1 ...

MG>https://maven.apache.org/shared/maven-archiver/index.html
Apache Maven Archiver – 
Reference<https://maven.apache.org/shared/maven-archiver/index.html>
maven.apache.org
Apache Maven Archiver. The Maven Archiver is mainly used by plugins to handle 
packaging. The version numbers referenced in the Since column on this page are 
the ...




I realize that these aren't particularly secure parameters, but right now
I'm just trying to see what it will take to get this working.

Is there a plugin that will allow me to modify an existing jar?  I'm using
the dependency plugin to retrieve them from Maven, but once I have them
locally, I'm not sure what to use to update the MANIFEST.  Is this
something the assembly plugin can do easily?  I've looked at the assmbly
descriptor reference, but don't see where/how it can be leveraged for this.

Thanks,

Eric

Reply via email to