Hi.

I use the following:

<dependencySets>
  <dependencySet>
        <outputDirectory>/lib</outputDirectory> 
        <unpack>false</unpack> 
        <scope>runtime</scope> 
  </dependencySet>
</dependencySets>

It puts all the dependencies into lib.

Rich


-----Original Message-----
From: Daniele Dellafiore [mailto:[EMAIL PROTECTED] 
Sent: 13 December 2007 12:19
To: Maven Users List
Subject: [assembly] add all dependency jars to lib folder in a "bin"
assembly

Hi all.

I am trying to accomplish this task. My target is to create a
compressed archive with the jar of my app and all the jars it depends
upon in a subfolder called lib. I am trying to customize the standard
bin descriptor so I have

              <configuration>
                                <descriptors>
                          <descriptor>src/assembly/bin.xml</descriptor>
                        </descriptors>
                 [.....]


and the bin.xml file is almost the same than the original. I just added
a

        <include>lib/**</include>

to include some native libraries I keep in lib folder. But the point
is that of course the jars are handled by maven so I expect there is
some automatic way to put all them in a custom output folder. I am
trying to understand how to do but I am failing.
I think the solutions is somewhere here:
http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#clas
s_binaries
but I Cannot figure out how...

Here is the bin.xml, thanks for any help.

<assembly>
  <id>bin</id>
  <formats>
    <format>tar.gz</format>
  </formats>
  <moduleSets>
    <moduleSet>
      <binaries>
        <includeDependencies>true</includeDependencies>
        <outputDirectory>lib</outputDirectory>
      </binaries>
    </moduleSet>
  </moduleSets>
  <fileSets>
    <fileSet>
      <includes>
        <include>README*</include>
        <include>LICENSE*</include>
        <include>NOTICE*</include>
        <include>lib/**</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>target</directory>
      <outputDirectory></outputDirectory>
      <includes>
        <include>*.jar</include>
      </includes>
    </fileSet>
  </fileSets>
</assembly>

-- 
Daniele Dellafiore
http://ildella.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to