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 is an error :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project myproject: Failed to clean project: Failed to delete D:\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 when I want to execute goals listed above, as I‘m using Eclipse IDE, the JVM denies for deleting this file.
Have you stopped Tomcat before clean? If not this is a typical problem on Windows, cause if the file is being used windows will lock that file and you can‘t delete it.
kill the java (TM) process from processes in you computer. re-run mvn cmd . It should work now.