> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Troy Laurin
> Sent: donderdag 25 november 2004 14:20
> To: Martin Aliger
> Cc: [EMAIL PROTECTED]
> Subject: Re: [nant-dev] Re: Fileset / <delete> task change
> 
> Martin Aliger wrote:
> 
> > If this change is done, what about to lower verbosity when deleting
> > non-existing files/folders also? I think verbose level is 
> ok for that
> > (todays it is error via BuildException).
> > 
> > Martin Aliger
> >  
> 
> Ant deals with this with a quiet="true":
> 
> quiet    If the specified file or directory does not exist, do not 
> display a diagnostic message (unless Ant has been invoked with the 
> -verbose or -debug switches) or modify the exit status to reflect an 
> error. When set to "true", if a file or directory cannot be 
> deleted, no 
> error is reported. This setting emulates the -f option to the Unix rm 
> command. Default is "false". Setting this to "true" implies setting 
> failonerror to "false".
> 
> 
> This seems to work well, because sometimes if the 
> file/directory you are 
> trying to delete doesn't exist it flags an error... typo in 
> the build file?

If I'm not mistaken, Ant only outputs a verbose-level message to the build
log when a file, that is specified using the "file" attribute, does not
exist. When a directory that is specified using the "dir" attribute does not
exist, no message whatsoever is output to the build log.

What the "quiet" attribute seems to do is (correct me if I'm wrong) :

- no longer have the task fail when a file/directory that is matched by a
fileset cannot be deleted (not just when it doesn't exist)
- output the cause of a failure using a verbose-level message instead of
using a warning level

What we should do is :

- only output a verbose-level message when the file / directory pointed to
by the "file" or "dir" attribute does not exist. Never fail the task if a
file or directory specified using the "file"/"dir" attribute does not exist.
This would match the behavior of Ant, except for the fact that Ant does not
output any message when the directory pointed to by the "dir" attribute does
not exist.  This can be changed for the 0.85 release, and documented as a
breaking change.

- add support for either a threshold or loglevel attribute to tasks (or
both) after the 0.85 release. This will allow build authors to control build
output on a task-level in a generic way, instead of introducing such a
mechanism for specific tasks.

Gert



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to