-----Original Message-----
From: Rob Wilson [mailto:[EMAIL PROTECTED] 
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
exists?

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">
<if> 
  <isset property="yourproperty"/> ...
  <then>
  ...
  </then>
  <else>
 ...
  </else>
</if>
</target>



Regards, Gilbert



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to