maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: Running maven shade on a preexisting jar
Date Tue, 08 Jul 2014 15:49:44 GMT
Ignore the sales pitch and the unpacking complexity.

1. Make an ordinary new project with no source code.

2. List your jar as a dependency.

3. Configure shade. It can be configured to operate on dependencies.
On Jul 8, 2014 6:30 AM, "james northrup" <northrup.james@gmail.com> wrote:

> MG: sure or
> http://en.wikipedia.org/wiki/Java_Decompiler
>
>
> On Mon, Jul 7, 2014 at 4:13 PM, Martin Gainty <mgainty@hotmail.com> wrote:
>
> >
> >
> > > From: northrup.james@gmail.com
> > > Date: Mon, 7 Jul 2014 14:31:31 -0700
> > > Subject: Re: Running maven shade on a preexisting jar
> > > To: users@maven.apache.org
> > >
> > > shade is a uber jar plugin.  there are 3 uber jar plugins that matter,
> > > shade, maven-assembly, and proguard.
> > >
> > > for beginners:
> > > all of them work more or less by merging a project into a  single new
> jar
> > > just reading the pom dependencies.
> > >
> > > maven assembly does the least work.  good for quick jobs
> > >
> > > shade-plugin sometimes does a good job but imho if it works once you
> are
> > > buying into a false sense of security and will be bitten as you grow a
> > > project.
> > >
> > > proguard is industrial strength and imho returns the best result for
> > > investing in rtfm.
> > >
> > > all of the above have a special configs to do parts and pieces.  a
> > > beginner's mistake would be to pursue that course of action.  don't.
> >  make
> > > a simple uber-jar project with one output jar combined from all of the
> > > input jars, and learn how to exclude collisions.
> > >
> > > if you have  some proprietary jar with no source spend some time with
> jad
> > > to make source and refactor your packages to do the above, "simple"
> > > uber-jar
> > MG>James i had some difficulty locating Java Decompiler (JAD) ..can i
> > assume this is JAD repository we should reference?
> > MG>http://varaneckas.com/jad/
> > >
> > >
> > > On Mon, Jul 7, 2014 at 2:15 PM, Robert James <srobertjames@gmail.com>
> > wrote:
> > >
> > > > How do I run Maven Shade on a standalone jar (ie with no sources to
> > > > build from)? Please realize that I'm a beginner to Maven.
> > > >
> > > > On 7/7/14, james northrup <northrup.james@gmail.com> wrote:
> > > > > hi shade can possibly juxtapose jar deps diffrently from one build
> > to the
> > > > > next in my experience. if you think you are having collisions you
> > should
> > > > > probably do 2 things
> > > > >
> > > > > 1) use <exclude> on the older jar from the older <dependency>
to
> > avoid
> > > > the
> > > > > collision
> > > > > 2) see if proguard fixes what shade breaks, if shade stays broken
> > after
> > > > #1.
> > > > >  it's pretty intense
> > > > >
> > > > >
> > > > > On Mon, Jul 7, 2014 at 12:21 PM, Robert James <
> > srobertjames@gmail.com>
> > > > > wrote:
> > > > >
> > > > >> I have a jar that I need to shade - that is, change the name
of
> many
> > > > >> of the internal classes (to avoid conflicts with another jar)
> except
> > > > >> for a few classes which remain exposed.  The jar is already built,
> > > > >> source is not at hand.  How can I use maven shade to shade that
> jar?
> > > > >>
> > > > >> (Disclaimer: I'm a maven neophyte)
> > > > >>
> > > > >>
> > ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > Jim Northrup  *  (408) 837-2270 *
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Jim Northrup  *  (408) 837-2270 *
> >
> >
>
>
>
> --
> Jim Northrup  *  (408) 837-2270 *
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message