ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [new tasks] presetdef and macrodef
Date Thu, 14 Aug 2003 19:53:11 GMT

Dominique Devienne wrote, On 14/08/2003 20.16:

> Jose Alberto answered that one indirectly. I know understand that the
> <macrodef> I had does not declare a 'name' or 'classname' attribute, and
> thus could not be used as I wrote it, whereas <presetdef> keeps access to
> all attributes of the preset'd type. Sorry for being so slow ;-) --DD

While the tasks themselves are wonderful, it's possible that the current 
naming can confuse users, and DD is quite a knowledgebale (how the heck 
do you write it!?) one.

I'm not a naming wizard (usually quite the opposite), but how about:

   <presetdef name="my.javac">
        <javac debug="${debug}" deprecation="${deprecation}"/>
   </presetdef>

becomes

   <taskdef name="javac"
            classname="whatever">
      <attribute name="debug" value="${debug}"/>
      <attribute name="deprecation" value="${deprecation}"/>
   </taskdef>

or

   <taskdef name="javac"
            classname="whatever">
     <template>
        <javac debug="${debug}" deprecation="${deprecation}"/>
     </template>
   </taskdef>

or

   <taskdef name="javac"
            classname="whatever">
     <defaults>
        <javac debug="${debug}" deprecation="${deprecation}"/>
     </defaults>
   </taskdef>

And

   <macrodef>  ->  <scriptdef language="ant">
                   <scriptdef language="javascript">
                   <scriptdef language="ant">

or

   <macrodef>  ->  <taskdef language="ant">
                   <taskdef language="javascript">
                   <taskdef language="ant">


BTW, any name is fine for me as long as it's put in Ant 1.6 ;-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



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


Mime
View raw message