ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject RE: About <macrodef> in the trenches
Date Fri, 10 Dec 2004 15:58:45 GMT
Thanks for the feedback Peter. I'll be off line most of Dec, so for now I'll just attach my
modified MacroDef/Instance files in bugzilla until I can properly try to integrate it to Ant
(it's not very tested yet, and not unit tested at all either). I worked off the 1.6 branch
anyway, and this would need to happen in the HEAD I guess, no?
About (1), you're right. I used my <bm:sequential> which is more like <xsl:if>
than <ac:if>, because it has no <then> or <else> block. 90% of the time,
I don't need if/then/else, just if. I find having conditions on <sequential> very natural
and the Ant way ;-)
(2) I initialy thought about putting it in the declaration, but I didn't think I could pull
it off. And after using it, I thought it was easier to read the macro code with the defaults
inside the macro impl instead of in the element declaration.
(3) I agree it requires to get used to, but for the client code actually looks more 'normal'
and task-like. Like (4), one doesn't have to use it.
(4) Again, it's a question of reuse. I don't deny using @{attr} in the macro instance looks
strange, but I did naturally try to use it with the regular Ant <macrodef> to learn
it didn't work. I wanted to avoid duplicate some info I had already entered in a macro attribute.
I'd say it's a nice to have thing, and one doesn't have to use it.
BTW, after droping this code in my Antlib, my checkstyle Javadocs error count jumped from
0 to 35 ;-) I'll try to fix this too. (I have a checkstyle config for Javadocs only). --DD


From: Peter Reilly []
Sent: Fri 12/10/2004 9:15 AM
To: Ant Developers List
Subject: Re: About <macrodef> in the trenches

All these features sould great.

1) this attribute is good.
     however,  it is only really usefull in combination with the iftrue
     or with ant-contrib "if" task

2) a default value for the element is good. The default value should
    be in the declaration, but it is ok to have it the body of the

3) this sounds good if a little stange initially.

4) this is good as well, if one is useing elements with macrodefs a lot.
It may
    be a bit confusing.

I would say go for it!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message