Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
How to achieve "if " and "unless "-style behaviour with macrodefs?

How to achieve "if " and "unless "-style behaviour with macrodefs?

2007-07-30       - By Keith Hatton
Reply:     1     2  

Hi,

I have cases where it would be useful to call a macrodef if a property
was set, but to skip it otherwise. If these were targets I could use the
standard Ant if/unless attributes to achieve this behaviour, but
macrodefs are called explicitly at certain points in the build file,
rather than using the Ant dependency model for target execution. I don't
see any corresponding options for a macrodef or (equivalently in my
case) for the sequential task. What's the best way to achieve this?

Thanks,
Keith


Axiom Systems Limited is a limited company registered in England and
Wales. Registered number: 2358771. Registered office: One Forbury
Square, The Forbury, Reading, Berks RG1 3EB



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.