ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <...@one2team.com>
Subject Re: I would like "echo" task to support the "if" and "unless" attribute
Date Fri, 19 Dec 2008 13:28:42 GMT
Le Friday 19 December 2008 14:15:21 sactiw, vous avez écrit :
> Hi Guys,
>            I really sometimes feel that <echo> task must should support the
> "if" and "unless" attribute.
>
>            So that I could write something like,
>
>            <echo if="thisPropertyExists">This Property Exists</echo>
>
>            <echo unless="thisPropertyDon'tExists">This Property Don't
> Exists</echo>
>
>            I think this is a very usefull feature and many people will find
> it very useful.
>
> Thanks and Regards,
> Sachin.

You could always use ant-contrib's <if>:

<if>
	<available property="theproperty"/>
	<then>
		<echo message="theproperty exists and is set"/>
	</then>
</if>

OK, it's longer to write, but it works.

-- 
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