I have an Ant script performing some updating etc and one task is to delete a few files and folders.
In Windows and especially version 7 there seem to be some kind of Read Only Attribute mayhem and I have tried several solutions with no success.
There are several other SO issues similar to this but no solution really.
Ant is not able to delete some files on windows
Is there any way to make Ant ignore the Read Only Attribute?
The ant chmod task seems only to work for Linux; searching for “ant chmod windows” yielded i.a. Attr. Then you could first make all writable. Maybe with ant delete failonerror=false.
Okay, that does not work too. Maybe use PsExec, a tool to run things as Administrator. Unlikely that a solution in the form of an ant task may be found.