Ant is not able to delete some files on windows

后端 未结 14 2349
我寻月下人不归
我寻月下人不归 2021-02-07 01:36

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 generate

14条回答
  •  囚心锁ツ
    2021-02-07 02:25

    It depends ...

    • The Ant process doesn't have enough permissions to delete the files (typically because they were created by a different user, perhaps a system user). Try running your Ant script as an administrative user, using Run As.
    • Windows is really bad at cleaning up file locks when processes die or are killed; consequently, Windows thinks the file is locked by a process that died (or was killed). There's nothing you can do in this situation other than reboot.
    • Get better tools to inspect your system state. I recommend downloading the SysInternals tools and using them instead of the default Windows equivalents.

提交回复
热议问题