ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <>
Subject RE: <property refid=> question
Date Wed, 26 Feb 2003 17:16:13 GMT
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 differently?

-----Original Message-----
From: [] 
Sent: Wednesday, February 26, 2003 11:00 AM
Subject: AW: <property refid=> question

-----Urspr√ľngliche Nachricht-----
>Von: Steve Cohen []
>Gesendet am: Mittwoch, 26. Februar 2003 17:52
>An: Ant Developers List
>Betreff: <property refid=> question
>The ant manual has no example of what this might be used for.  Can 
>someone explain it?

<path id="path">
    <fileset dir="."/>
<property name="p" refid="path"/>

Sample Output:
     [echo] C:\tmp\anttests\propertyRefId\;C:\tmp\anttests\propertyRefId

>Here's what I am trying to do: write a generic task that might do 
>something with a fileset reference but which will not throw errors if 
>that fileset has not been defined.  If there's another way to do it, 
>I''m all ears.

sorry, have to keep it open

Jan Matèrne

View raw message