ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: antlib descriptor
Date Wed, 20 Feb 2002 15:31:07 GMT
On Wed, 20 Feb 2002, Conor MacNeill <conor@cortexebusiness.com.au>
wrote:
> Jose Alberto Fernandez wrote:

>> <ejbjar> but also basic things like <condition>, <mappers>, etc.
>> Needing to use Mutant's notation all over the place, defeates the
>> hole purpose.
> 
> It does not need to be used all over the place. BTW, what in your
> view is the whole purpose?

If you wanted to implement ConditionBase to only hold

addCondition(Condition)

and throw out all addAvailable, addIsset ... methods, how would that

    <condition property="some.regexp.support">
      <or>
        <isset property="jdk1.4+" />
        <isset property="jakarta.regexp.present" />
        <isset property="jakarta.oro.present" />
      </or>
    </condition>
    
look?  My understanding (no, I haven't read any code, yet) from your
description is

    <condition property="some.regexp.support">
      <condition ant:type="or">
        <condition ant:type="isset" property="jdk1.4+" />
        <condition ant:type="isset" property="jakarta.regexp.present" />
        <condition ant:type="isset" property="jakarta.oro.present" />
      </condition>
    </condition>

which is a little too verbose for me. 8-)

>> Bt for some reason people dislike it (that is why we keep on having
>> things like <ejbjar>, <condition> etc.
> 
> I'm not sure to what you are referring when you say people disklike
> "it". When has this sort of facility been implemented

I think he means, if people liked the verbose syntax, <conditon> would
have been implemented /that/ way:

    <condition property="some.regexp.support">
      <container classname="org.apache.tools.ant.taskdefs.conditions.Or">
        <condition classname="org.apache.tools.ant.taskdefs.conditions.IsSet">
          <param name="property" value="jdk1.4+" />
        </condition>
        <condition classname="org.apache.tools.ant.taskdefs.conditions.IsSet">
          <param name="property" value="jakarta.regexp.present" />
        </condition>
        <condition classname="org.apache.tools.ant.taskdefs.conditions.IsSet">
          <param name="property" value="jakarta.oro.present" />
        </condition>
      </container>
    </condition>

which would be easy to do right now.

> For example, consider a task which takes two filesets
> <diff>
>    <fromFS .../>
>    <toFS .../>
> </diff>
> 
> It has methods like this
> addFromFS(Fileset from);
> addToFS(Fileset to);

Oh, this is where Adam needs the additional attribute to disambiguate
the addXYZ case.  Hadn't thought of it.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message