ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: Checking whether a property is set
Date Fri, 09 Nov 2007 11:39:09 GMT
-----Original Message-----
From: Rob Wilson [] 
Sent: Friday, November 09, 2007 12:22 PM
To: Ant Users List
Subject: Checking whether a property is set

I can check whether a file exists and set a property, but can I check
whether a property exists and set a property based on whether it

I don't mind how this is checked, I just need to make sure that my
JUnit test stops if the property isn't set.

you can call  your target with unless

<target name="runJUnit" unless="yourproperty">

so it runs only when yourproperty is not set

also possible =
<target name="runJUnit">
  <isset property="yourproperty"/> ...

Regards, Gilbert

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

View raw message