ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dave_davis <>
Subject conditional logic and user input
Date Thu, 02 Jul 2009 00:00:48 GMT


I want to be able to control my build depending on user input.  I've tried
the following code but the ifyes and ifno targets never run.  I'm new to ant
so am sure I've missed something fundamental but can't see what it is - all
help appreciated!



<project name="test" default="myDefault">

	<target name="myDefault">
		<input message="Enter the value" addproperty="result" />
		<condition property="">
			<equals arg1="Y" arg2="${result}" />
		<condition property="">
			<equals arg1="N" arg2="${result}" />
		<echo message="${result}"/>
		<echo message="${}"/>
		<echo message="${}"/>
		<antcall target="ifyes" />
		<antcall target="ifno" />


	<target name="ifyes" if="${}">
		<echo message="I am yes" />
	<target name="ifno" if="${}">
		<echo message="I am no" />

View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message