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

Reply via email to