Maven - 未能执行 goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean

2022-09-03 03:12:37

我在我的pom中有以下依赖项的问题.xml其中org.springframework.version = 3.1.0.RELEASE:

<!-- Spring MVC framework -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>${org.springframework.version}</version>
</dependency>

当我执行命令行“mvn全新安装”时,我遇到以下错误:

 [INFO] BUILD FAILURE
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 1.052s
 [INFO] Finished at: Sat Dec 07 15:49:04 CET 2013
 [INFO] Final Memory: 4M/15M
 [INFO] ------------------------------------------------------------------------
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project myGoogleAppEngine: Failed to clean project: Failed to delete C:\EclipseProjects\myGoogleAppEngine\target\myGoogleAppEngine-0.0.1-SNAPSHOT\WEB-INF\lib\spring-webmvc-3.1.0.RELEASE.jar -> [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

通过在 http://mvnrepository.com/artifact/org.springframework/spring-webmvc/3.1.0.RELEASE 上看到,我的依赖关系中没有任何错误。

您有什么解决方案吗?


答案 1

未能删除 C:\EclipseProjects\myGoogleAppEngine\target\myGoogleAppEngine-0.0.1-SNAPSHOT\WEB-INF\lib\spring-webmvc-3.1.0.RELEASE.jar

由于路径,我想你有日食运行在该项目上。如果应用程序运行,则无法清理输出,因为它可能正在使用中。C:\EclipseProjects

停止应用程序,也许可以日食,然后再试一次。


答案 2

删除任务管理器中的 java.exe进程,然后重新执行。它对我有用。


推荐