Ant is not able to delete some files on windows

2020-05-31 05:11发布

I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I try to delete them manually it works just fine. The files are apparently not open by any other process but ant still does not manage to delete them. What can I do?

14条回答
做个烂人
2楼-- · 2020-05-31 05:46

i faced this issue as the file the ant was trying to delete was being used by some other service/process. I stopped the service, and then the ant build script did run through.

查看更多
神经病院院长
3楼-- · 2020-05-31 05:47

Using Ant Retry task has helped me. I've just wrapped it around the Delete Task.

查看更多
登录 后发表回答