<fail message="" /> in 1.4.1.
<fail message="" unless="property" /> in 1.5 beta (very useful change). --DD

-----Original Message-----
From: Das, Kuntal [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 28, 2002 4:08 PM
To: Ant Users List
Subject: How do I do a System.exit() in ant ? 

I am trying to check a command-line argument in a target. And if it is not
present then I want to show an informative message, like "Usage : ant
-Ddebug=.....". After displaying the message I want to exit from the ant
process. How can I do that ? 
Scenario : 
 
 <target name="testParam" unless="debug">
  <echo message="Usage : ant -buildfile &lt;location of build.xml&gt;
-Ddebug=&lt;on/off&gt; &lt;target name&gt; "/>
 </target>
 
<target name="build_dataModel" depends="testParam, init">
  <javac srcdir="${build.dir}" destdir="${build.dir}" debug="${debug}">

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

Reply via email to