ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Master, Tariq \(Abbeywood\)" <>
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.

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

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+ ?


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

View raw message