Walter,

Use a zipfileset as the source in a zip task.  You can use
includes/excludes to filter the files-to-copy:

<zip destfile="tmp.jar">
        <zipfileset src="src.jar">
                <exclude name="**/*.class" />
        </zipfileset>
</zip>
<move file="tmp.jar" tofile="src.jar" />

-Justin
office 8-383-6725, 212-272-6725; cell 917-861-6042

-----Original Message-----
From: RADEMAKERS Tanguy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 5:44 AM
To: Ant Users List
Subject: RE: Remove entru from ZIP file using ANT
Importance: Low

Hello Walter,

Don't think there's a one-step way to do this via the update="true"
attribute , but you could do it like this:

1. unzip archive into a temp folder
2. delete the archive
3. delete the file(s) you don't want from the temp folder
4. rezip the contents of the temp folder into a new zip.

long winded, but should be fine unless you have some **huge** archives.

/t
 

>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, February 12, 2008 7:40 AM
>To: user@ant.apache.org
>Subject: Remove entru from ZIP file using ANT
>
>Hi,
>
>Is there a possibility in ANT to remove an entry from ZIP 
>resource? Or do 
>I need to write my own task for that?
>
>Kind regards,
>Walter
>

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




***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

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

Reply via email to