ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: Problem Reusing Condition API
Date Tue, 23 Jun 2009 15:05:51 GMT
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
View raw message