ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: conditional attributes for arg and env elements
Date Wed, 12 Jul 2006 21:13:49 GMT
--- wrote:

> Hello,
> Would it be possible to add if and unless attributes
> to the env and arg
> elements used in exec, in the same way that include
> and exclude elements
> have? This would make the use of exec more flexible.
> A problem that I currently have is that a script
> being called from Ant
> will check the environment variables. The idea is
> that it behaves in a
> similar way to Ant, in that the behaviour will
> change depending on
> whether a environment property is defined. But I
> cannot see how to do
> this with Ant as <env> elements cannot be
> conditionally defined. If an
> <env> element is added with a given name, that env
> variable will exist
> in the execution environment even if the value is an
> empty string.
> Any suggestions on alternative approaches are
> appreciated. This could be
> done with XSLT but I would rather not introduce that
> level of
> complexity.

if it is "defined vs. not defined" you could use
conditionally defined presetdefs.  If it is (or can be
interpreted as) value-contingent, you could use a
conditionally-set property value.


> paul

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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

View raw message