ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject AW: <property refid=> question
Date Wed, 26 Feb 2003 17:22:36 GMT
If you want to write a task, I think you can test whether that reference is
(or if there are any hits in the fileset).
Sorry, but I haven´t done it, so I can´t give you any example code.

Jan Matèrne

-----Ursprüngliche Nachricht-----
Von: Steve Cohen []
Gesendet am: Mittwoch, 26. Februar 2003 18:16
An: Ant Users List
Betreff: 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

-----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:

>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

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message