On 2011-11-08, Steve Amerige wrote:
> I'd like to do something like:
> <if>
> <mymacrodef/>
> <then>
> ...
> </then>
> </if>
> <macrodef name="mymacrodef">
> ...
> </macrodef>
> Within the macrodef, there would be places it would return true and
> other places it returns false. I want the solution to be wholly in
> Ant (no Java, Groovy, external file use, etc.).
> Is it possible? If so, can you show an example of how the mymacrodef would
> be coded?
No. macrodef can only be used to define tasks, not conditions (which is
what you'd need).
What you can do is what Mike suggests. Use your macrodef to set a
property and then use isset as condition inside your if.
<mymacrodef property="foo"/>
<if>
<isset property="foo"/>
<then>
...
</then>
</if>
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]