ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: <property refid=> question
Date Wed, 26 Feb 2003 17:24:01 GMT
<property name="" refid="my" />

Just grabs the Object associated to the "my" reference, and calls toString()
on it. There's no toString() on FileSet, and the question is not that one
cannot be created, but what it should return...

Path (<path>) as a toString() method, because one knows what the textual
representation of a Path should be (even though it's platform-dependent, it
is clearly defined).

To convert a <fileset> to a property, use <pathconvert>. --DD

-----Original Message-----
From: Steve Cohen [] 
Sent: Wednesday, February 26, 2003 11:16 AM
To: Ant Users List
Subject: RE: <property refid=> question

Sorry for originally posting this on ant-dev.  I meant to post it to
ant-user.  So I will move over there now.


And actually, even this doesn't even work for filesets (which the manual
correctly does note):

    <fileset id="globallibs" dir="${global.lib}">
    <target name="temptest">
        <property name="p1" refid="globallibs"/>
        <echo message="${p1}"/>



So is there really no way to write a generic task that does something with a
fileset if it is defined but nothing if it is not?  Or can I get around this
by introducing a "default" empty definition of the reference?  Do references
work like properties - first one to define it keeps it?  Or are they handled

View raw message