Re: Running maven shade on a preexisting jar

2014-07-08 Thread Benson Margulies
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.ja...@gmail.com wrote:

 MG: sure or
 http://en.wikipedia.org/wiki/Java_Decompiler


 On Mon, Jul 7, 2014 at 4:13 PM, Martin Gainty mgai...@hotmail.com wrote:

 
 
   From: northrup.ja...@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
  MGJames i had some difficulty locating Java Decompiler (JAD) ..can i
  assume this is JAD repository we should reference?
  MGhttp://varaneckas.com/jad/
  
  
   On Mon, Jul 7, 2014 at 2:15 PM, Robert James srobertja...@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.ja...@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 
  srobertja...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




 --
 Jim Northrup  *  (408) 837-2270 *

   
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
   
   
  
  
   --
   Jim Northrup  *  (408) 837-2270 *
 
 



 --
 Jim Northrup  *  (408) 837-2270 *



RE: Running maven shade on a preexisting jar

2014-07-08 Thread Martin Gainty
will do 

thanks Benson

M-


 Date: Tue, 8 Jul 2014 11:49:44 -0400
 Subject: Re: Running maven shade on a preexisting jar
 From: bimargul...@gmail.com
 To: users@maven.apache.org
 
 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.ja...@gmail.com wrote:
 
  MG: sure or
  http://en.wikipedia.org/wiki/Java_Decompiler
 
 
  On Mon, Jul 7, 2014 at 4:13 PM, Martin Gainty mgai...@hotmail.com wrote:
 
  
  
From: northrup.ja...@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
   MGJames i had some difficulty locating Java Decompiler (JAD) ..can i
   assume this is JAD repository we should reference?
   MGhttp://varaneckas.com/jad/
   
   
On Mon, Jul 7, 2014 at 2:15 PM, Robert James srobertja...@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.ja...@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 
   srobertja...@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-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
  --
  Jim Northrup  *  (408) 837-2270 *
 

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


   
   
--
Jim Northrup  *  (408) 837-2270 *
  
  
 
 
 
  --
  Jim Northrup  *  (408) 837-2270 *
 
  

Running maven shade on a preexisting jar

2014-07-07 Thread Robert James
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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Running maven shade on a preexisting jar

2014-07-07 Thread james northrup
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 srobertja...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




-- 
Jim Northrup  *  (408) 837-2270 *


Re: Running maven shade on a preexisting jar

2014-07-07 Thread Robert James
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.ja...@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 srobertja...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




 --
 Jim Northrup  *  (408) 837-2270 *


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Running maven shade on a preexisting jar

2014-07-07 Thread Dan Tran
this is just guess

1. create  jar project with no source

2. hook up maven-dependency-plugin to unpack your jar into target/classes

3. hook up maven-shade-plugin to massage your target/classes


Good luck

-D



On Mon, Jul 7, 2014 at 2:15 PM, Robert James srobertja...@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.ja...@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 srobertja...@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-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
  --
  Jim Northrup  *  (408) 837-2270 *
 

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: Running maven shade on a preexisting jar

2014-07-07 Thread james northrup
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


On Mon, Jul 7, 2014 at 2:15 PM, Robert James srobertja...@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.ja...@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 srobertja...@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-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
  --
  Jim Northrup  *  (408) 837-2270 *
 

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




-- 
Jim Northrup  *  (408) 837-2270 *


RE: Running maven shade on a preexisting jar

2014-07-07 Thread Martin Gainty


 From: northrup.ja...@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
MGJames i had some difficulty locating Java Decompiler (JAD) ..can i assume 
this is JAD repository we should reference?
MGhttp://varaneckas.com/jad/
 
 
 On Mon, Jul 7, 2014 at 2:15 PM, Robert James srobertja...@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.ja...@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 srobertja...@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-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
  
  
  
   --
   Jim Northrup  *  (408) 837-2270 *
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
 -- 
 Jim Northrup  *  (408) 837-2270 *
  

Re: Running maven shade on a preexisting jar

2014-07-07 Thread james northrup
MG: sure or
http://en.wikipedia.org/wiki/Java_Decompiler


On Mon, Jul 7, 2014 at 4:13 PM, Martin Gainty mgai...@hotmail.com wrote:



  From: northrup.ja...@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
 MGJames i had some difficulty locating Java Decompiler (JAD) ..can i
 assume this is JAD repository we should reference?
 MGhttp://varaneckas.com/jad/
 
 
  On Mon, Jul 7, 2014 at 2:15 PM, Robert James srobertja...@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.ja...@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 
 srobertja...@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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
   
   
   
   
--
Jim Northrup  *  (408) 837-2270 *
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
  
 
 
  --
  Jim Northrup  *  (408) 837-2270 *





-- 
Jim Northrup  *  (408) 837-2270 *