Thanks for that Andrew, looks like what I was thinking I would have to do,
thanks once again for saving me a couple of hours of trying to work it.

Cheers

Paul

Andrew Boyer wrote:
> 
> Paul,
> 
> I used the dependency and assembly plugins.  Something like:
> 
> <plugin>
>   <artifactId>maven-assembly-plugin</artifactId>
>   <configuration>
>     <descriptors>
>       <descriptor>src/main/assembly/dist.xml</descriptor>
>     </descriptors>
>   </configuration>
> </plugin>
> <plugin>
>   <artifactId>maven-dependency-plugin</artifactId>
>   <executions>
>     <execution>
>       <id>copy-dependencies</id>
>       <phase>package</phase>
>       <goals>
>         <goal>copy-dependencies</goal>
>       </goals>
>       <configuration>
>         <outputDirectory>${basedir}/target/dist/lib</outputDirectory>
>         <includeScope>runtime</includeScope>
>         <overWriteIfNewer>true</overWriteIfNewer>
>       </configuration>
>     </execution>
>   </executions>
> </plugin>
> 
> With the following assembly descriptor:
> 
> <assembly>
>   <id>dist</id>
>   <formats>
>     <format>zip</format>
>     <format>tar.gz</format>
>   </formats>
>   <includeBaseDirectory>false</includeBaseDirectory>
>   <fileSets>
>     <fileSet>
>       <directory>target/dist</directory>
>       <outputDirectory>/</outputDirectory>
>       <excludes>
>         <exclude>*tests.jar</exclude>
>       </excludes>
>     </fileSet>
>   </fileSets>
> </assembly>
> 
> Hope that helps.
> 
> Andrew
>> -----Original Message-----
>> From: Paul G [mailto:[EMAIL PROTECTED]
>> Sent: Monday, July 23, 2007 4:15 PM
>> To: [email protected]
>> Subject: Packaging a release of a jar with dependencies
>> 
>> 
>> I would like to know the best way to create a release artifact such as
> a
>> zip
>> which contains my jar file along with all it's dependency jars in a
> bin
>> directory of the zip. I have used the assembly plugin to create wars
> with
>> external configs files and docs. But have not found any easy examples
> of
>> how
>> to package a jar. I know you can copy all the dependencies to a
>> destination
>> folder with the dependency plug in, does that mean I am looking at
> using
>> the
>> dependency and assembly plug in together attached to the packaing
> phase to
>> achieve what I want?
>> --
>> View this message in context:
> http://www.nabble.com/Packaging-a-release-
>> of-a-jar-with-dependencies-tf4132165s177.html#a11751868
>> Sent from the Maven - Users mailing list archive at Nabble.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Packaging-a-release-of-a-jar-with-dependencies-tf4132165s177.html#a11753298
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to