java - Maven - 无法执行目标 org.apache.maven.plugins :maven-clean-plugin:2. 4.1:clean

标签 java spring maven spring-mvc

我的 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 clean install”时,出现以下错误:

 [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 ,我的依赖项中没有任何错误。

你有什么解决办法吗?

最佳答案

Failed to delete C:\EclipseProjects\myGoogleAppEngine\target\myGoogleAppEngine-0.0.1-SNAPSHOT\WEB-INF\lib\spring-webmvc-3.1.0.RELEASE.jar

因为路径 C:\EclipseProjects 我猜你在那个项目上运行了 eclipse。如果您的应用程序运行,则无法清除输出,因为它可能正在使用中。

停止应用程序,也许 eclipse 然后重试。

关于java - Maven - 无法执行目标 org.apache.maven.plugins :maven-clean-plugin:2. 4.1:clean,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20442862/

相关文章:

java - 将 log4j 1.x 和 log4j 2 与依赖于 log4j 1.x 的第三方库混合

java - 在 Eclipse 中调试 Thorntail 服务?

java - 两个线程之间的通信

spring - @Autowired Spring @Component 和 @ConditionalOnProperty

maven - 从maven项目中获取jar

java - 将多个项目和依赖项构建到一个 jar 文件中

Java 8 : preferred way to count iterations of a lambda?

java - spring java配置环境变量

spring - 阐述 Spring 注解 API 文档

java - Maven 版本 :update not updating the given version, 与存储库进行比较并更新到最新版本而不是给定版本