ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: if/else structure
Date Wed, 08 May 2002 19:04:15 GMT
That's actually a good idea, this 'requires' thingy? But I'd rather have it
on <project> or <target>, as an attribute.

Consider the use case where a build file uses new feature of ANT 1.5. How is
it going to fail for 1.4.1 users? A crypt task or type not found? Or type
<mytype> not allowed? Of course, adding this attribute now to 1.5 would also
fail miserably for pre-1.5 users, but in the future, whenever new version
come out, ANT could fail gracefully, with a proper message?

I guess a separate task like Diane used makes it more backward compatible
(as long as it extends Task, and does not take advantage of new 1.5 feature
allowing any Java class with an public execute method to be taskdef'd). --DD

-----Original Message-----
From: Diane Holt [] 
Sent: Wednesday, May 08, 2002 1:58 PM
To: Ant Users List
Subject: RE: if/else structure

--- wrote:
> the problem is that earlier versions of ant doesn't support the nested
> contains element. :)

Doh! (Got a bad cold, so my brain's a bit mushy.)

I wrote a little <requires> task some time ago that lets you say which
version is required. So target "chkVersion" would become:

  <target name="chkVersion">
    <requires version="1.5Beta1"/>

Want it?


Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

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

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

View raw message