ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject Re: To fail or not to fail
Date Fri, 30 Nov 2001 14:24:55 GMT
From: "Stefan Bodewig" <>

> I still think that all build failures should be handled/caused by fail
> and would prefer if we removed the ability from the two above tasks.
> If adding if/unless attributes to <fail> (or a nested <condition>
> element for the same task) is the price for this, I am willing to pay
> it.

Interesting. So what you are in fact saying is to make <fail/> a condition
container, just like <waitfor/>.

After all, the only things currently allowed in fail is either the message
attribute or TEXT. That would give a much more unified approach.

    - <condition/> to conditionally set properties.
    - <fail/> to conditionally fail
    - <waitfor/> to conditionally wait.

I like it!

Hummm, can we have conditional targets also? :-)

    <target name="xyz" depends="pqr" >
            <!-- onlyif is a condition container whch is not a task but part of the <target>
definition -->
       <!-- the tasks for the target go here -->

This would mean that you can keep the REAL conditions for executing a target as part of the
itself and not 10 pages away in some other init target (unless you want to for reasons of
And moreover, it will reduce the proliferation of auxiliary properties all over the code.

Well just some food for thought...

Jose Alberto

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

View raw message