Java異常處理001:Maven打包時Failed to clean project: Failed to delete
異常日志:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean (default-clean) on project fmk-web: Failed to clean project: Failed to delete D:\WORK\INTELLIJ\xuegao\fmk-web\target\xuegao\WEB-INF\classes\com\hs\web\interceptor -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :fmk-web
?
分析原因:
- 通過maven 打包時在clean 時提示 target 文件被占用;?
解決方案:
關閉占用即可;具體如下:
1-在開始搜索框中,輸入“資源監視器”,打開資源監視器:在該窗口中,切換到cpu 頁簽,然后在 關聯的句柄中,輸入 文件名(target),按下回車鍵,即可查找到被占用的進程 ;如下圖
?
2-選中搜索結果,右鍵結束進程;即可;
?