I ' m trying to run simple struts project using MAVEN and Tomcat.
When I'm trying to exucute next Goals:clean install Tomcat7:run, there are anerror :
[ERROR] Failed to execute goal Org.apache.maven.plugins:maven-clean-plugin:2.5:clean (Default-clean) on project MyProject: Failed to Project:failed to deleted:\eclipseworkspace\myproject\target\tomcat\logs\access_log.2015-02-21-> [Help 1]
I ' ve googled and understand that Tomcat uses this access_log file, where he logs user requests. And by the time if I want to execute goals listed above, as I ' m using Eclipse IDE, the JVM denies for deleting this file .
Solution1:
stopped Tomcat beforeclean? If it is a typical problem on Windows, cause if the file is being used Windows would lock that file and yo u can ' t delete it.
Solution2:
I ' ve seen this sort of error whenever there's a process that's holding a lock on a file in some subfolder that ' s Maven is trying-clean. Check that your Tomcat instance are really stopped (look for Java processes in Task Manager, that shouldn ' t be there) .
Close the process, because Tomcat does not really shut down when you build again.
I ' ve also created this issue for myself by opening the access log in a text editor, and then forgetting to close the Edito R after shutting down the Tomcat and trying to run a new build.
Similar
from in the you computer. Re-run mvn cmd. It should work now.
Maven Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean Failed to delete access_log