I use STS(spring tool suite) + maven plugin.
Every time when I run my application using maven-clean
I see following error:
[INFO] Scanni
For linux users: possible solution.
Build error due to "Failed to delete < any-file-or-folder >" will occur if there is by chance of only delete access provided to root user rather to normal-user.
Fix : type ll command to list file that cannot be deleted, if the file is given root access, change to normal user by :
sudo chown -R user-name:user-name filename
Later try for maven clean and build.
I solved mine by doing:
For some reasons it worked for me . Good luck !!
Please close all the browser tab. And next time when you try to upload war from another place except target folder.
If you run into this error in an IDE like Eclipse or IntelliJ, you may have one or more debug windows open and paused on a break-point. Terminate them.
Try disabling Project->Build Automatically.
As Scorpio suggested, there's a process running that's got a lock on a file somewhere.
I have a large multi-module maven project that regularly fails on clean and this resolves it for me. I re-enable Build Automatically when I'm done.
I had similar issue. Earlier I was using Maven 3 to build the project. After switching to maven 2 , I had the above error.
Solved it by switching to Maven 3.