ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vallon, Justin" <jval...@bear.com>
Subject RE: Remove entru from ZIP file using ANT
Date Tue, 12 Feb 2008 13:30:52 GMT
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:Tanguy.RADEMAKERS@swift.com] 
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: Walter.Heestermans@toyota-europe.com 
>[mailto:Walter.Heestermans@toyota-europe.com] 
>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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org




***********************************************************************
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message