--- Hannes van der Merwe <[EMAIL PROTECTED]> wrote:
> How would you do that exactly, because there is nothing involving
> properties in the documentation under the copy target?
Sorry -- I guess that reply was a bit vague (yesterday was a bit
rushed)...
I meant: Reference the (comma-separated list) property in the <fileset>
element for the <copy> task. For example:
<property name="FILES" value="a.dat:b.dat:c.dat"/>
<target name="doCopy">
<pathconvert pathsep="," property="FILES.list">
<path>
<pathelement path="${FILES}"/>
</path>
<map from="${basedir}${file.separator}" to=""/>
</pathconvert>
<copy todir="tmp">
<fileset dir="." includes="${FILES.list}"/>
</copy>
</target>
The pathsep="," converts the colons to commas, and the <map> turns the
files back into their simple filenames, which is necessary because a)
<path> turns them into full-path filenames, and b) <fileset> can't handle
full-path filenames (not sure why <copy> doesn't allow a list of names
instead of insisting on either one file in the "file" attr or a set of
files derived via <fileset>, since that seems oddly limiting to me -- but
I suspect if I complained about it, someone would just tell me to fix it,
so you didn't hear if from me :)
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>