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

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.