ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mithun Gonsalvez <mithungonsal...@gmail.com>
Subject Re: Problem Reusing Condition API
Date Wed, 24 Jun 2009 10:46:42 GMT
Hi Dominique,

Thank You for the reply.

> Why derive from MacroDef rather than simply Task?
 I want the functionality of MacroDef 'attribute' as well as sequence.
 Thought that this might be way by which I do not have to write everything
:)

> This adds a nested <condition> tag, while you add a <equals> one.
> You need to have an add() method instead. I don't recall the exact rules
though.
 The <condition> tag when evaluated to true, will set a property [which i
want to avoid]
 Instead i would like to evaluate the conditions and take another action.
 Currently I am adding methods specific to different Condition Types, as you
have mentioned.


> Why not simply use Ant-Contrib's <if> task?
 Yes, Thank you for the pointer. I will look into Ant-Contrib as well.


Thank You,
Mithun Gonsalvez



On Tue, Jun 23, 2009 at 8:35 PM, Dominique Devienne <ddevienne@gmail.com>wrote:

> On Tue, Jun 23, 2009 at 7:55 AM, Mithun
> Gonsalvez<mithungonsalvez@gmail.com> wrote:
> > public class TestCheck extends MacroDef {
>
> Why derive from MacroDef rather than simply Task?
>
> >    public static class MySingleArgument {
> >
> >        List<Condition> conditions = new ArrayList<Condition>();
> >
> >        public void addConfiguredCondition(Condition condition) {
> >            this.conditions.add(condition);
> >        }
>
> This adds a nested <condition> tag, while you add a <equals> one.
> You need to have an add() method instead. I don't recall the exact rules
> though.
>
> >  ie. to evaluate each condition and then take an appropriate decision.
> > I do now wish to set any property value after evaluation of the
> condition,
> > hence <condition> tag was omitted.
>
> Why not simply use Ant-Contrib's <if> task? --DD
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message