ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: conditional "arg"
Date Tue, 18 Aug 2009 13:46:57 GMT
On Sat, Aug 15, 2009 at 10:23 AM, Blaine Simpson<blaine.simpson@admc.com> wrote:
> Any chance that if I submitted a patch for "if" and "unless" attribute
> support for the <arg> sub-element, that it would make it into Ant
> distributions within a couple years?

What if we said yes? You'd write the code/test/doc for it then? :)

In case your itch is strong enough, I'd say something that works at the
UnknownElement level to "disappear" attributes and elements before
they are converted into set/add calls would be the most generic, as
task code doesn't need to change then. The trick is to make this code
dependent on the current context to access properties. Not sure it's
possible at all, but that's how I'd first try to do it.

As Stefan mentioned, you're still not quite explaining / showing why
you need conditional args. Even I who's been in favor of more conditional
processing in Ant would like to see some concrete examples which
would demonstrate your need. Often there are other ways to do it,
and again as Stefan mentions, one can always write one's own tasks.
I've done that a lot of that, and most of them were conditional, mostly
because I was dealing with native+java code on multiple platforms.

Anyways, not sure it applies, but just in case you are using Ant as a launcher,
this hack of mine which allows easier passing of command line args to <java>
and <exec> might be of interest:
https://issues.apache.org/bugzilla/show_bug.cgi?id=30651

--DD

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


Mime
View raw message