ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject how to check that a property exist
Date Wed, 11 Jun 2008 10:22:23 GMT
Hi all,

I'm trying to find out a solution for the below issue.

I've a properties file like that:


I run my build.xml providing a parameter:

ant -DIPEvent=TestEvent

And I would like to set the value of a property named 'pollerEventValue'
according to these rules:

1) if exists a property like 

    <property name="pollerEvent"

then the requested value is:

    <property name="pollerEventValue" value="${${pollerEvent}}"/>
?????? but I think the syntax is wrong

2) else take as value

    <property name="pollerEventValue"

So if I run:

 ant -DIPEvent=TestEvent   the expected value is B
 ant -DIPEvent=other       the expected value is A (the default one)

Could anyone help me to solve that ?

Thanks in advance for any help. 

This e-mail transmission is intended for the named 
Its contents are private, confidential and protected 
from disclosure and should not be read, copied or
disclosed by any other person. 
If you are not the intended recipient, we kindly ask
you to notify the sender immediately by telephone 
(+41 (0)58 806 50 00), to redirect the message to the 
account "" and to delete this e-mail.
E-mail transmissions may be intercepted, altered or 
read by unauthorized persons and may contain viruses.
Therefore, it is recommended that you use regular mail
or courier services for any information intended to be 
confidential. However, by sending us messages through
e-mail, you authorize and instruct us to correspond by 
e-mail in the relevant matter. 
Thank you.

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

View raw message