|
Lance Norskog
2012-08-04, 23:04
Ted Dunning
2012-08-04, 23:10
Lance Norskog
2012-08-04, 23:35
Alex Ott
2012-08-05, 08:25
Ted Dunning
2012-08-05, 08:56
Lance Norskog
2012-08-07, 01:16
|
-
Maven build unpacks jars- would jar of jars work?Lance Norskog 2012-08-04, 23:04
The Maven build does a grand project unpacking multiple jars into one
big one. Java apparently supports packing jars inside other jars- the outer jar needs a classpath property for the inside jars. When someone rearranged the Maven build, did they try this out? Is there a Maven task for jar-of-jars? -- Lance Norskog [EMAIL PROTECTED]
-
Re: Maven build unpacks jars- would jar of jars work?Ted Dunning 2012-08-04, 23:10
I didn't think that Java supports jars inside jars.
On Sat, Aug 4, 2012 at 5:04 PM, Lance Norskog <[EMAIL PROTECTED]> wrote: > The Maven build does a grand project unpacking multiple jars into one > big one. Java apparently supports packing jars inside other jars- the > outer jar needs a classpath property for the inside jars. When someone > rearranged the Maven build, did they try this out? Is there a Maven > task for jar-of-jars? > > -- > Lance Norskog > [EMAIL PROTECTED] >
-
Re: Maven build unpacks jars- would jar of jars work?Lance Norskog 2012-08-04, 23:35
There's an ant task, a discussion of its use, and a discussion of jars-in-jars.
http://ant.apache.org/manual/Tasks/manifestclasspath.html http://stackoverflow.com/questions/858766/generate-manifest-class-path-from-classpath-in-ant http://grokbase.com/t/ant/user/0213wdmn51/building-a-fileset-dynamically#20020103j47ufvwooklrovrjfdvirgohe4 On Sat, Aug 4, 2012 at 4:10 PM, Ted Dunning <[EMAIL PROTECTED]> wrote: > I didn't think that Java supports jars inside jars. > > On Sat, Aug 4, 2012 at 5:04 PM, Lance Norskog <[EMAIL PROTECTED]> wrote: > >> The Maven build does a grand project unpacking multiple jars into one >> big one. Java apparently supports packing jars inside other jars- the >> outer jar needs a classpath property for the inside jars. When someone >> rearranged the Maven build, did they try this out? Is there a Maven >> task for jar-of-jars? >> >> -- >> Lance Norskog >> [EMAIL PROTECTED] >> -- Lance Norskog [EMAIL PROTECTED]
-
Re: Maven build unpacks jars- would jar of jars work?Alex Ott 2012-08-05, 08:25
At least Hadoop is able to find jars inside jar, if they're placed
inside lib directory in the jar - I use this for packing my code (via assembly plugin), with following assembly description: <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> <id>job</id> <formats> <format>jar</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <unpack>false</unpack> <scope>runtime</scope> <outputDirectory>lib</outputDirectory> <excludes> <exclude>${artifact.groupId}:${artifact.artifactId}</exclude> <exclude>org.apache.hadoop:hadoop-core</exclude> </excludes> </dependencySet> <dependencySet> <unpack>true</unpack> <includes> <include>${artifact.groupId}:${artifact.artifactId}</include> </includes> </dependencySet> </dependencySets> </assembly> On Sun, Aug 5, 2012 at 1:10 AM, Ted Dunning <[EMAIL PROTECTED]> wrote: > I didn't think that Java supports jars inside jars. > > On Sat, Aug 4, 2012 at 5:04 PM, Lance Norskog <[EMAIL PROTECTED]> wrote: > >> The Maven build does a grand project unpacking multiple jars into one >> big one. Java apparently supports packing jars inside other jars- the >> outer jar needs a classpath property for the inside jars. When someone >> rearranged the Maven build, did they try this out? Is there a Maven >> task for jar-of-jars? >> >> -- >> Lance Norskog >> [EMAIL PROTECTED] >> -- With best wishes, Alex Ott http://alexott.net/ Twitter: alexott_en (English), alexott (Russian) Skype: alex.ott
-
Re: Maven build unpacks jars- would jar of jars work?Ted Dunning 2012-08-05, 08:56
Yes.
Hadoop does do some strange and surprising things with jars when executing them. On Sun, Aug 5, 2012 at 2:25 AM, Alex Ott <[EMAIL PROTECTED]> wrote: > At least Hadoop is able to find jars inside jar, if they're placed > inside lib directory in the jar - I use this for packing my code (via > assembly plugin), with following assembly description: > > <assembly > xmlns=" > http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=" > http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 > http://maven.apache.org/xsd/assembly-1.1.0.xsd"> > <id>job</id> > <formats> > <format>jar</format> > </formats> > <includeBaseDirectory>false</includeBaseDirectory> > <dependencySets> > <dependencySet> > <unpack>false</unpack> > <scope>runtime</scope> > <outputDirectory>lib</outputDirectory> > <excludes> > <exclude>${artifact.groupId}:${artifact.artifactId}</exclude> > <exclude>org.apache.hadoop:hadoop-core</exclude> > </excludes> > </dependencySet> > <dependencySet> > <unpack>true</unpack> > <includes> > <include>${artifact.groupId}:${artifact.artifactId}</include> > </includes> > </dependencySet> > </dependencySets> > </assembly> > > > On Sun, Aug 5, 2012 at 1:10 AM, Ted Dunning <[EMAIL PROTECTED]> wrote: > > I didn't think that Java supports jars inside jars. > > > > On Sat, Aug 4, 2012 at 5:04 PM, Lance Norskog <[EMAIL PROTECTED]> wrote: > > > >> The Maven build does a grand project unpacking multiple jars into one > >> big one. Java apparently supports packing jars inside other jars- the > >> outer jar needs a classpath property for the inside jars. When someone > >> rearranged the Maven build, did they try this out? Is there a Maven > >> task for jar-of-jars? > >> > >> -- > >> Lance Norskog > >> [EMAIL PROTECTED] > >> > > > > -- > With best wishes, Alex Ott > http://alexott.net/ > Twitter: alexott_en (English), alexott (Russian) > Skype: alex.ott >
-
Re: Maven build unpacks jars- would jar of jars work?Lance Norskog 2012-08-07, 01:16
Ah. Half the items I see about this include "you need a special classloader".
On Sun, Aug 5, 2012 at 1:56 AM, Ted Dunning <[EMAIL PROTECTED]> wrote: > Yes. > > Hadoop does do some strange and surprising things with jars when executing > them. > > On Sun, Aug 5, 2012 at 2:25 AM, Alex Ott <[EMAIL PROTECTED]> wrote: > >> At least Hadoop is able to find jars inside jar, if they're placed >> inside lib directory in the jar - I use this for packing my code (via >> assembly plugin), with following assembly description: >> >> <assembly >> xmlns=" >> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation=" >> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 >> http://maven.apache.org/xsd/assembly-1.1.0.xsd"> >> <id>job</id> >> <formats> >> <format>jar</format> >> </formats> >> <includeBaseDirectory>false</includeBaseDirectory> >> <dependencySets> >> <dependencySet> >> <unpack>false</unpack> >> <scope>runtime</scope> >> <outputDirectory>lib</outputDirectory> >> <excludes> >> <exclude>${artifact.groupId}:${artifact.artifactId}</exclude> >> <exclude>org.apache.hadoop:hadoop-core</exclude> >> </excludes> >> </dependencySet> >> <dependencySet> >> <unpack>true</unpack> >> <includes> >> <include>${artifact.groupId}:${artifact.artifactId}</include> >> </includes> >> </dependencySet> >> </dependencySets> >> </assembly> >> >> >> On Sun, Aug 5, 2012 at 1:10 AM, Ted Dunning <[EMAIL PROTECTED]> wrote: >> > I didn't think that Java supports jars inside jars. >> > >> > On Sat, Aug 4, 2012 at 5:04 PM, Lance Norskog <[EMAIL PROTECTED]> wrote: >> > >> >> The Maven build does a grand project unpacking multiple jars into one >> >> big one. Java apparently supports packing jars inside other jars- the >> >> outer jar needs a classpath property for the inside jars. When someone >> >> rearranged the Maven build, did they try this out? Is there a Maven >> >> task for jar-of-jars? >> >> >> >> -- >> >> Lance Norskog >> >> [EMAIL PROTECTED] >> >> >> >> >> >> -- >> With best wishes, Alex Ott >> http://alexott.net/ >> Twitter: alexott_en (English), alexott (Russian) >> Skype: alex.ott >> -- Lance Norskog [EMAIL PROTECTED] |