ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glenn McAllister" <>
Subject Re: Nasty gotcha with new <delete>
Date Thu, 12 Oct 2000 14:49:20 GMT

I'll update the docs to make that more explicit.  Sorry if this caused you
any headaches.

Hmm... would it make more sense to limit a delete to either a dir, a file,
or filesets?  That would make

<delete dir="${some.dir}" file="somefile.txt" />

illegal and prevent people from possibly blowing things away.

Glenn McAllister
Software Developer. IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey

Please respond to

Subject:  Nasty gotcha with new <delete>

If you specify:

<delete dir="${some.dir}" file="somefile.txt"/>

It deletes both the entire contents of the directory, and the file (or
tries to, but of course it doesn't find it, since it's not looking for it
in "dir"). The documentation doesn't make it clear that "file" isn't
expected to be appended to "dir", and that they are completely separate
from each other. I realize -now- that that makes sense, but when you're
changing an old-style <delete> that used to be:

<delete dir="${some.dir}" includes="somefile.txt"/>

to the new-style delete, it's awfully easy not to realize that, until it's
too late. Good thing I have all those files copied in another directory,
or I'd be a pretty unhappy camper right about now.



Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!

View raw message