ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <>
Subject Re: Reset BuildNumber
Date Thu, 07 May 2009 16:15:10 GMT
Le Thursday 07 May 2009 17:08:13 Eric Fetzer, vous avez écrit :
> Why do you use <macrodef> for one line of code?  Basically, you're creating
> a subset of <math> with <increment>.  Is that standard among the Ant
> community?

I don't know, since I can't really describe myself as being a member of the 
ant community ;) I love macros since I'm used to C's preprocessor, and 
well-written macros (in particular, macros with a meaningful name) help 
shorten the code a lot. Also, I like large tabs, and usually use 8 spaces 
wide tabs - but that's just not practical with XML - or Java for that matter. 
So, in this case, I prefer a "nested" style like I did.

You can take my macro definition (macrodef - heh) as a deeply ingrained C 
habit too: it helps keeping things short, sweet, and to the point. But then, 
that's a coding style, YMMV ;)

My particular choice of implementation here is also guided by the fact that, 
despite its usefulness, ant-contrib is still not part of base ant (and I 
really don't have the Java skills to build up a patchset that would make it 
included, license/development model problems aside), so I try keeping the 
ant-contrib stuff in my build files to a minimum. I only use var, math and 
if/then/else, which is already a lot. The switch keyword is nice, too ;)

Francis Galiegue
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
40 avenue Raymond Poincaré
75116 Paris

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

View raw message