David Jack Wange Olrik

Tea. Earl Grey. Hot.

Ant Sucks, and Doesn't Respect Symlinks...

Man I hate Ant! So I was working on this project, in which Ant generates a build directory. - I created a symlink inside the build dir for something that was not quite ready to be build for real just yet. That way ant could do what ever it wanted to, my code was stored safely in another location. Or so i thought… ant clean ant build

Did Ant delete just the symlink ? - Noooo… like a busy little beaver it delete the *contents* as well! The following little statement in the clean target nukes the specified directory recursevly deletes *all* files and *follows* symlinks as well. Bad Ant!