ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <>
Subject Modification of Ant API for AntDSL
Date Sat, 28 Jul 2012 12:39:40 GMT
Hi guys,

I start to like what I am doing which the AntDSL so I would like to modify a little bit the
Ant API so I can avoid doing so work around.

In AntDSL, I have introduced an expression language so do some basic computing: some math,
some logical computation and string manipulation for now. It is intended to replace the property
expansion in strings.

Actually, the logical computation is already implemented in Ant: the Conditions tasks. So
I have used them for the if/unless attributes of the target. I would like to take it back
into Ant: [1]. I don't intend to replace the existing if/unless, just offer new Java API to

I would also like to be able to have expressions in task attributes. But Ant assumes these
are always Strings. As far as I can tell, there are two places where it is assumed and it
would be changed: RuntimeConfigurable and IntrospectionHelper. I have been able to work around
RuntimeConfigurable and provide my own implementation. But IntrospectionHelper is final.
I have not a patch to suggest, but I think the change would probably be about introducing
an interface Evaluable, change everywhere from String to Object, and when we try to get the
value of the attribute, if Evaluable call eval(), otherwise call .toString().

The changes I suggest should obviously be backward compatible. I also don't think the new
API on Target should imply a change in the XML ProjectHelper, an xml syntax of an if condition
would probably be ugly.

So is there any comment, objection regarding this API change ?



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

View raw message