ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Master, Tariq \(Abbeywood\)" <Tariq.Mas...@uk.bp.com>
Subject How to fail if macro attribute is not set
Date Mon, 21 Aug 2006 15:24:55 GMT
I would like my macro definition to fail if an attribute is not.
Example:

<macrodef name="SomethingSmart">
        <attribute name="idea" description="The blah blah"/>
        <sequential>
            <fail message="Cannot do something great unless an idea is
set" unless="idea"/>
		<!--  things to do -->
        </sequential>
</macrodef>



The fail in the above case always fails as the attribute isn't
recognised as a property.  Unless I'm incorrect.

Ideas or potential idea for Ant 1.7+ ?

Tariq

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message