You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Dijk, G.J. van (Gerard)" <Ge...@akzonobel.com> on 2002/04/05 14:53:11 UTC

How to extract files from jar and add to jar with jar task

Hello Ant users,
 
The zip task supports the <zipfileset> element.
With the <zipfileset> attribute 'src' one can extract the contents of a zip
file and include it in a zip archive.
I would like to do the analogous with jar, i.e. extract the contents of a
jar file and include it in a jar archive.
The ant manual chapter 'jar' states:
 
"The extended fileset attributes from the zip task are also available in the
jar task."
 
I have tried a number of variations but none succeeded. 
Any suggestions?
 
 
With kind regards
 
Gerard van Dijk, an Ant novice
 
Akzo Nobel Systems
Pres.Kennedylaan 104
6883 AX  Velp
Tel: +(31) 26 3845824
Fax: +(31) 263845840
Email: gerard.vandijk@akzonobel.com <ma...@akzonobel.com> 
 
 

Re: How to extract files from jar and add to jar with jar task

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 5 Apr 2002, G. J. van Dijk <Ge...@akzonobel.com>
wrote:

> "The extended fileset attributes from the zip task are also
> available in the jar task."

It should work exactly the same way as with zip.  JARs are ZIPs.

<jar jarfile="...">
  <zipfileset src="other.jar" />
</jar>

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>