ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <...@one2team.com>
Subject Re: if conditions on numerical values?
Date Wed, 29 Apr 2009 18:25:01 GMT
Le Wednesday 29 April 2009 19:12:42 oli85, vous avez écrit :
> I'm running a java task in ant and manage it capture its return value (0 or
> 1)  by using resultproperty attribute of java task. What I'm looking for is
> to fail the ant build if this value is not 0. So does anyone know if ant
> support such feature? Thank you very much in advance!

You don't need numerical arithmetic for this (if you need it anyway, have a 
look at ant-contrib's <math> task). You can use plain ant:

<fail message="Houston, we have a problem">
	<condition>
		<not>
			<equals arg1="theproperty" arg2="0"/>
		</not>
	</condition>
</fail>


-- 
Francis Galiegue
fge@one2team.com
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
One2team
40 avenue Raymond Poincaré
75116 Paris

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


Mime
View raw message