ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From warhero <beingthexempl...@gmail.com>
Subject Re: help with some conditional logic..
Date Tue, 24 Jul 2007 03:40:31 GMT


bill/wilandra wrote:
> 
> Create a target named init which will define/set props.someprop to any 
> value.
> <target name="test1" depends="init" if="props.someprop">
> 
> HTH Bill
> 
> --
> This would kind of work. But this will fail to execute all commands in a
> "depends" chain. if one of the if tests isn't met then subsequent target's
> won't execute.
> 
> Aaron
> 
> 
> warhero wrote:
>> <?xml version="1.0" encoding="utf-8" />
>> <project name="testing" default="test2" basedir="./">
>> 	
>> 	<property file="build.properties" />
>> 	
>> 	<target name="test1">	
>> 		<!-- if props.someprop --> ##how use some logic based on a property
>> from
>> the props file that will either execute the "exec" or just pass it?
>> 			<exec executable"myExecutable" >
>> 				<arg line="-some-command" />
>> 			</exec>
>> 		<!-- end -->
>> 	</target>
>> 	
>> 	<target name="test2" depends="test1">
>> 		<exec executable="anotherExecutable">
>> 			<arg line="-some-command" />
>> 		</exec>
>> 	<target>
>> 	
>> </project>
>>
>> So what im trying to do is only execute if a property is true.. Obviously
>> some pretty simple logic but doing that in ant?
>>
>> thanks
>>   
> 
> 

-- 
View this message in context: http://www.nabble.com/help-with-some-conditional-logic..-tf4133302.html#a11756516
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message