ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: suggestions
Date Thu, 20 Sep 2001 17:17:52 GMT
--- Craig Longman <> wrote:
> 1) it seems like some way of quickly comparing a property to some value
> would be helpful.  as an '=' is almost certainly never going to be a
> valid character in a property, this kind of thing should work pretty
> well:
>   <target name="target" if=""/>
>   <target name="target" if=""/>

Diligently (very very :) asked for a looong time ago, and turned down
flat. (I ended up having a modified for quite awhile for that
very reason. With the advent of <condition> in 1.4, that can finally
[yay!] go away.)

> 2) something that calls one or more targets AFTER a target has
> completed.  for example, in my init target, i often have properties that
> i need to conditionally set, and currently the only way to easily do
> that is multiple targets with 'if' attributes.  but, i would still want
> to ensure that the init is completed first, while still ensuring that
> the other conditional-inits are completed immediately following the init
> target.

Maybe I'm just not fully awake yet this morning, but -- you lost me. The
only I know of to start another target before the first one is done is to
include an <antcall>/<ant> in it, then have additional tasks after that.
  <target name="foo">
    <echo message="I'm foo..."/>
    <antcall target="bar"/>
    <echo message="I'm foo again."/>
  <target name="bar">
    <echo message="I'm bar..."/>

BTW: There's a problem with logging on this -- the "[echo] I'm foo again."
ends up printing out as a task of target bar (oops).

> 3) some way to silence a target.

Use NoBannerLogger.

> 4) some way to indicate that a target is to be only called from the
> build file itself, not externally.  this is basically what i'm trying to
> simulate in 3), but being able to code it directly in the build file
> might be helpful.

I suppose an attribute could be added to <target> (eg., "external";
defaults to yes), but I'm not knowledgeable enuf with Ant's internals to
say for sure how easy that would be to do.



Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information

View raw message