ant-dev mailing list archives

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

> 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>
            <!-- onlyif is a condition container whch is not a task but part of the <target>
definition -->
        </onlyif>
       <!-- the tasks for the target go here -->
    </target>

This would mean that you can keep the REAL conditions for executing a target as part of the
target
itself and not 10 pages away in some other init target (unless you want to for reasons of
reusability).
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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message