ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Sumit.Srivast...@ubs.com>
Subject If task
Date Fri, 14 Mar 2008 00:21:21 GMT
Hi All,

	is there a way to implement the following if-else clause in ANT
?

	<if>
		 <equals ${prop1}="1"/>
		 <then>
			<exec executable="cmd">
			  <arg value="/c"/>
			  <arg value="${SQL_ROOT}\Dev1.bat"/>
			</exec>
		 </then>
			
		 <elseif>
		  <equals ${prop1}="2" />
		  <then>
			<exec executable="cmd">
			  <arg value="/c"/>
			  <arg value="${SQL_ROOT}\Dev2.bat"/>
			</exec>
		  </then>
		  </elseif>
		 <else>
			<exec executable="cmd">
			  <arg value="/c"/>
			  <arg value="${SQL_ROOT}\Dev3.bat"/>
			</exec>
		 </else>
		</if>


I need to check for the value of the property "prop1" based on which
need to run batch scripts. According to the manuals , do I need to check
values based on whether the value is set/unset ?

Thanks all,
Sumit

Mime
View raw message