----- Original Message -----
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 26, 2000 9:31 AM
Subject: Re: <require>, <fail unless="..."> or <available fail="...">


> In case you didn't follow the other threads. <require> would be the
> same as <available> but have an additional message attribute which
> would be used to throw a BuildException if the resource can not be
> found. Thus combining <available> and your modified <fail> into a
> single task - making it even more explicit.
>

You are right, I didn't for the thread which handled require.

So we have these options currently:

1. Extend available with an fail-attribute which contains a message to print
if the requested resource is not available
2. Create a new task require which extends available and prints a message if
the requested resource is missing
3. Extend fail to query availability of properties and to fail depending on
their existence/non-existence

1 Will work but will not allow to fail if something exists
2 Seems real overhead for me since it's just another name for 1 (although it
makes behaviour obvious), will work the same way as 1 does but will not
allow to fail if something exists
3 Will only work in combination with 1 (and/or property and/or other future
tasks which may set condtionally set a property) but will also allow to fail
if something exists/is set in addition to 1 and 2

Since only option 3 will allow me to check for the existence of a property
and make my buildfile more stable I must vote for 3 :-)

What do others think?

Nico


Reply via email to