我正在尝试运行我的项目,但是日食说我有错误,但是没有错误,只是项目名称所在的红叉。我试图清理Maven项目。以下是问题。
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building E2Eproject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ E2Eproject ---
[INFO] Deleting C:\Users\DTMLLUAdminUser\E2Eproject\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.856 s
[INFO] Finished at: 2019-02-11T14:42:55-08:00
[INFO] Final Memory: 5M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project E2Eproject: Failed to clean project: Failed to delete C:\Users\DTMLLUAdminUser\E2Eproject\target\test-classes -> [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 `enter code here`read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
答案 0 :(得分:0)
删除失败 C:\ Users \ DTMLLUAdminUser \ E2Eproject \ target \ test-classes
这通常是由于目标文件夹内的文件由于应用程序仍在运行(在cmd,eclipse或Web浏览器中)而被锁定
可以尝试的一些事情:
如果应用程序在Eclipse中运行,请停止运行
如果ctrl + c在命令提示符下运行,则终止该应用程序
关闭正在运行该应用程序的所有浏览器
如果您已经关闭了网络浏览器,请转到“任务管理器”,并确保没有任何后台运行
完成上述所有操作后,请尝试再次mvn clean
项目
如果仍然看到相同的异常,请尝试重新启动计算机。这样可以确保删除目标文件夹上的锁,并且您应该能够再次清理项目