ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: suggestions
Date Fri, 21 Sep 2001 01:54:19 GMT
On Fri, 21 Sep 2001 06:04, Craig Longman wrote:
> On Thu, 2001-09-20 at 13:17, Diane Holt wrote:
> > --- Craig Longman <craigl@begeek.com> 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="some.property=hello"/>
> > >   <target name="target" if="some.property=goodbye"/>
> >
> > Diligently (very very :) asked for a looong time ago, and turned down
> > flat. (I ended up having a modified Target.java for quite awhile for that
> > very reason. With the advent of <condition> in 1.4, that can finally
> > [yay!] go away.)
>
> any valid reason why it was turned down?  just not something the
> maintainer(s) liked?
> the condition in 1.4 might help me for somethings, but it is so
> verbose.  one thing i've never liked about so many projects, is the
> tendency to making something so verbose it is no longer readable.  the
> '=' option mentioned here is so much more readable than a multi-line
> condition tag, and is also right in the target tag, which is where you'd
> expect it to be.

Because as soon as we did that there would almost imeadiately be someone who 
wanted != and then probably < or > or ... 

Before too long you could have

<target name="target" if="((x='y')&&(y>z+u))||(a~=b)"/>

The if/else target attributes were originally added with much objection from 
ant-dev and there are some (ie me) who would like to see them removed 
altogether ;)

> <target name="foo" depends="before" after="bar">
> ...
> </target>

Looks like

<target name="bar" depends="foo" />
<target name="foo" depends="before"/>

> will look at this. but again, sounds like a lot of typing just to
> silence a target.  thanks.

More control will occur in Ant2.

> not sure either.  i will look into it perhaps.  i was thinking that the
> same analogy as the java access would work.  having a public/private
> type of attribute.  probably a public defaulting to yes.  i think that
> this would make sense to have.  ant seems to really encourage multiple
> targets, but it could be dangerous if an internal only target was
> invoked directly.  i'll see.

It has been proposed and KBed before but it may make it in come Ant2.

-- 
Cheers,

Pete

*------------------------------------------------*
| You can't wake a person who is pretending      |
|       to be asleep. -Navajo Proverb.           |
*------------------------------------------------*


Mime
View raw message