I tried that but then, copy (verbose="true") tells me something like:
[copy] //host/share/dir1/dir2/one file.txt omitted as
//host/share/dir1/dir2/one file.txt is up to date.

So it means copy actually tried to copy the files over themselves ? It
did not take its "todir" attribute into account ?

On Fri, Jun 25, 2010 at 4:21 PM, Patrick Martin <antu...@gmail.com> wrote:
> I still don't get how <copy> will know which basedir to take from the
> source files in order to recreate the correct folder structure in the
> "todir" folder.
> Let's say that my file list contains the full path:
>
> //host/share/dir1/dir2/one file.txt
> //host/share/dir1/dir2/two files.txt
> //host/share/dir1/three files.txt
>
> I loaded that in my property.
> Then:
> <copy todir="${target.dir}">
>  <resourcelist>
>    <propertyresource name="property-holding-list-of-files"/>
>  </resourcelist>
> </copy>
>
> How will copy know it should take files in //host/share/dir1 or in
> //host/share  for example?
>
> On Fri, Jun 25, 2010 at 4:08 PM, Stefan Bodewig <bode...@apache.org> wrote:
>> On 2010-06-25, Patrick Martin wrote:
>>
>>> This looks really promising! How do you use it with copy?
>>
>> <resourcelist> is a resource collection, you can use it everywhere where
>> Ant supports them.
>>
>> <http://ant.apache.org/manual/Types/resources.html#resourcelist>
>>
>> In particular you can use it as a nested element of <copy> directly.
>>
>>> where is the equivalent of the "dir" attribute of <fileset> or
>>> <filelist>?
>>
>> There is none.  Do you need one?
>>
>> If all your path's are relative to a common dir ${dir} and you have
>> those relative path inside a file "myfiles.txt" you'd do something like
>>
>> <copy ...>
>>  <resourcelist>
>>    <file file="myfiles.txt"/>
>>    <prefixlines prefix="${dir}/"/>
>>  </resourcelist>
>> </copy>
>>
>> to turn your relative paths into absolute paths.
>>
>> Stefan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>> For additional commands, e-mail: user-h...@ant.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to