ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: looping in ant
Date Tue, 05 Feb 2002 00:12:52 GMT
I thought this would be an easy one, but it made me work and also find a bug
in <copy> (which will be patched shortly).

This *should* have worked, based on the documentation, but a flaw in the
logic for a one-file fileset causes it to lose the directory prefix and
issues an error (see the documentation on <copy> for the explanation of the
single-file fileset): [ Note: this solution only worked with post-1.4.1 Ant,
since the single-file fileset trick was added after the release ]
    <copy tofile="known.zip">
       <fileset dir="copy"/>
    </copy>


This should work for you though, even in v1.4.1 (although I only tried it
with my 1.5alpha build):
     <copy tofile="known.zip">
       <fileset dir="copy"/>
       <mapper type="glob" from="*" to="known.zip"/>
     </copy>

Erik


----- Original Message -----
From: "Shvartsburd, Feliks" <Feliks.Shvartsburd@kmv.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Monday, February 04, 2002 2:16 PM
Subject: RE: looping in ant


>
> I need to do the following thing:
>
> 1. Copy .zip file to target directory and change its name in target
> location.
> Problem is that file name that I need to copy is not static. It changes
> appending timestamp to it. All I know that there is only one single .zip
> file in that location. Does anyone have an idea how to do that?
> Thanks
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message