ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Genter" <rgen...@silverlink.com>
Subject RE: conditional logic and user input
Date Thu, 02 Jul 2009 15:08:53 GMT
> From: dave_davis [mailto:nickcooke@hotmail.com]
> Sent: Wednesday, July 01, 2009 5:01 PM
> To: user@ant.apache.org
> Subject: conditional logic and user input
> 
> 
> Hi,
> 
> 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!
> 	<target name="ifyes" if="${result.is.yes}">
> 		<echo message="I am yes" />
> 	</target>
> 	<target name="ifno" if="${result.is.no}">
> 		<echo message="I am no" />
> 	</target>

The if attribute takes the name of the property, not its value. These
should be

<target name="ifyes" if="result.is.yes">

and

<target name="ifno" if="result.is.no">

--
Rick Genter
Principal Software Engineer
Silverlink Communications



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message