ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Goubard <>
Subject Re: ANT 1.7 features suggestion
Date Wed, 05 May 2004 17:42:01 GMT wrote:

>> 1) Integrate if and unless at the Task level.
>>This would allow all ANT tasks to have the if and unless 
>>attribute (the 
>>same way that it has an id attribute).
>>So far the only way to do it is by using <target> except if 
>>you use one 
>>of the task which has already the "if" "unless" attributes 
>>such as <fail>.
>>I think ANT users would use this feature to remove some 
>>tartget created 
>>only for the purpose of the "if" or would remove the 
>>ant-contrib <if> task.
>> 2) Same thing for the components fileset, mapper, include?, ...
>Why not on ProjectComponent? I thought about that ... but not very deeply.
>And on that level we´ll get problems with external tasks (on our own we
>can delete the if/unless-attributes, e.g. in junit-<test>).
>Maybe the namespace could be more helpful.
Indeed why not on ProjectComponent. I also think that if the task is not 
executed because of the if/unless there shouldn't be any taskStarted 

>"if/unless should accept a list". 
>Then we´d have to specify what should be true (how they are combined
>- if: AND - all properties have to be set
>- unless: OR - one property will stop the execution
>Another approach would be a new PropertyHelper. I thought about that when
>I had played with the JXPath-example in the proposals. More complicated
>could be realized then
>  if="${logic: prop1 AND (prop2 OR prop3)}"
I don't mind if it's not possible to test several properties at the same 
time, it's easy to use the <condition> task just before calling your 

>> 6) Get the properties from a target after antcall
>>  At the moment if you have a target that define some properties, the 
>>only way to call it in order to get the values is using "depends".
>>  This is a problem as you may want to invoke your target not 
>>at the beginning or you may want to pass some parameters.
>>  That's why it would be nice to have a "keepProperties" (or 
>>attribute to the <ant> and <antcall> task.
>Sounds for a <return> task or a <antcall returnproperty=""/>.
Note that in the example I gave the <return> or returnproperty wouldn't 
work as I need both properties defined in my target.


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

View raw message