On 2010-06-25, Patrick Martin 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?
I see. Throw in a <mapper> to strip the prefix again.
<copy todir="${target.dir}">
<resourcelist>
<propertyresource name="property-holding-list-of-files"/>
</resourcelist>
<globmapper from="//host/share/dir1/*" to="*"/>
</copy>
If there are different roots you want to copy from, you could use a
<firstmatchmapper> to wrap the alternatives.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]