On Wed, 15 May 2002, Glen Marchesani <[EMAIL PROTECTED]> wrote:

>   <delete file="generated.jar"/>    
> 
> This only works if the file does exist if it doesn't I get an error

Hmm, works for me

[bodewig@bodewig tmp]$ cat b.xml
<project default="b">
  <target name="b">
    <delete file="not-there" />
  </target>
</project>

[bodewig@bodewig tmp]$ ant -f b.xml 
Buildfile: b.xml

b:

BUILD SUCCESSFUL
Total time: 1 second

and with -verbose

b:
   [delete] Could not find file /tmp/not-there to delete.

BUILD SUCCESSFUL

> "D:\foo\build.xml:295: Unable to delete file D:\foo\generated.jar"

This is the message you will get if the file exists but cannot be
deleted.

Stefan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to