Maven Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean Failed to delete access_log

I've seen this sort of error whenever there's a process that's holding a lock on a file in some subfolder that Maven is trying to clean. Check that your Tomcat instance is really stopped (look for java processes in Task Manager that shouldn't be there). I've also created this issue for myself by opening the access log in a text editor, and then forgetting to close the editor after shutting down the Tomcat and trying to run a new build.


Micahel Peacock and khmarbaise were right about some proccess is blocking the deletion.

This is some tip for maven newbies, like me.

I've faced such problem, because after running Tomcat with maven goals clean install tomcat7:run I stopped it either through shutdown batch file in ${CATALINA_HOME}/bin directory or through installed Eclipse Tomcat plugin by clicking on the next label:

menu panel

But to do it in the right way you should click on stop label in console view:

console view

Then locale tomcat instance will be stopped and no such errors would appears, because proccess will shutdown gracefully.