ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Zip files: elegant way of remapping directories while extracting?
Date Wed, 03 Dec 2008 04:57:35 GMT
On 2008-12-02, Brown, Carlton <> wrote:

>> From: Stefan Bodewig []

>> On 2008-11-26, Brown, Carlton <> wrote:

>>> Here is my fantasy code that would accomplish the <unzip>
>> as elegantly
>>> as the <zip> can be peformed in actuality:
>>> <unzip src="">
>>> 	<zipfileset dir="en/html" includes="*" prefix="/root"/>
>>> 	<zipfileset dir="en/jsp" includes="*" prefix="/root"/>
>>> 	<zipfileset dir="static/pdf" includes="*" prefix="/root/pdf"/>
>>> </unzip>

>> wouldn't that be

>>   <copy todir="/root">
>>     <zipfileset src=""/>
>>     <chainedmapper>
>>       <globmapper from="en/html/*" to="*"/>
>>       <globmapper from="en/jsp/*" to="*"/>
>>       <globmapper from="static/pdf/*" to="pdf/*"/>
>>     </chainedmapper>
>>   </copy>

>> the globmappers should ignore all files that don't match the
>> from patterns.

> That's the problem, I don't wish to ignore all files that don't match
> the 'from' patterns.

Grab the firstmatch mapper from svn trunk
typedef it and replace the chainedmapper of my example with it - and
add an identity mapper at the end.

This is the least intrusive solution I can offer.  svn trunk offers
more options and so will Ant 1.8.x (no release date planned, yet).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message