Hello Eric,

we are using assembly plugin to achieve this:
https://github.com/apache/openmeetings/blob/master/openmeetings-screenshare/pom.xml#L158

On Tue, Nov 14, 2017 at 8:53 AM, Eric B <ebenza...@gmail.com> wrote:

> Martin,
>
> Thanks, but the jar-plugin only allows to build a jar from the current
> project (and set appropriate Manifest entries).  I'm looking to modify an
> existing jar.  I could use the dependency plugin to retrieve the jar, and
> unpack it, then point the jar-plugin to the unpacked dependency and have it
> repkg the dependency from the unpacked classes, but was hoping for
> something a little less manual.  For multiple dependencies, I would need to
> write a different execution config for the jar-plugin which becomes quite
> bloatsome for my pom.  I was just hoping for a cleaner/easier approach.
>
> I started looking at the shade plugin with a manifest transformer, but that
> too becomes individual execution configs.
>
> Thanks,
>
> Eric
>
> On Mon, Nov 13, 2017 at 8:03 PM, Martin Gainty <mgai...@hotmail.com>
> wrote:
>
> >
> >
> > ________________________________
> > From: Eric B <ebenza...@gmail.com>
> > 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.ap
> > ache.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
> >
>



-- 
WBR
Maxim aka solomax

Reply via email to