You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by sactiw <st...@nvidia.com> on 2008/12/19 14:15:21 UTC
I would like "echo" task to support the "if" and "unless" attribute
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.
--
View this message in context: http://www.nabble.com/I-would-like-%22echo%22-task-to-support-the-%22if%22-and-%22unless%22-attribute-tp21091031p21091031.html
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
Re: I would like "echo" task to support the "if" and "unless"
attribute
Posted by sactiw <st...@nvidia.com>.
Francis Galiegue-4 wrote:
>
> 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
>
Thanks for the quick reply Francis.
But factually this is exactly what I have been using for last few weeks and
when I saw that <fail> task already has a support for "if" and "unless"
attribute from that very moment I started thinking that why can't <echo>
task also support them in the same way.
In short, I ams looking for alternatives to do that rather I am suggesting a
small feature that will be helpful to many of us.
Regards,
SacTiw.
--
View this message in context: http://www.nabble.com/I-would-like-%22echo%22-task-to-support-the-%22if%22-and-%22unless%22-attribute-tp21091031p21094372.html
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
Re: I would like "echo" task to support the "if" and "unless" attribute
Posted by Francis Galiegue <fg...@one2team.com>.
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