ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: Ant 1.7 - resources, unzip and copy
Date Fri, 14 Apr 2006 15:09:52 GMT
--- Patrick Martin <> wrote:

> Hello,
> I am having a look at the new resource feature in
> ant 1.7. This looks
> extremly promising! Congratulations!
> I have a question regarding <unzip> and <copy>: do
> we still need
> <unzip> in 1.7? Can't we do everyting <unzip> can do
> with <copy> now?

Hmm... I hadn't thought of it that way, but...
> In ant 1.7, one can do something like:
> <copy todir="dest">
> 	<zipfileset src="pronline.war" includes="*" />
> </copy>
> Also, <zipfileset> now supports nested resource
> collections (like
> <fileset>) to work on several zip files at the same
> time.
Actually, you'd better re-read that.  The context in
which a nested resource collection is supported is
when it contains a single element, to be taken as the
source "file" for the zipfileset.  This could (should?
 I haven't tested this) make it possible, e.g., to
extract an archive contained in another archive.  Note
that the "resource" types are all designed to be
single-element resource collections, which is
admittedly a strange design decision but which I chose
anyway due to the simplicity it would bring wrt
adapting tasks to accept resourcecollections.

> The "Related tasks" in the <unzip> doc shows that
> <unzip> can be
> replaced by <copy>. Is there anything that we can do
> with <unzip> but
> not with <copy>?

Umm... use a different encoding for filenames in the
archive?  I guess really the fact that copy is usable
in this way actually predates 1.7 and resource
collections, going farther back to when resources
themselves were first introduced.

> Thanks,

Thanks for the feedback!


> Patrick Martin.
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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

View raw message