java - 无法运行 mvn clean

标签 java maven

当我在 Windows 7 PC 上运行“mvn clean”时收到如下错误消息。 我尝试重新安装 maven 仍然没有解决错误。除了 mvn clean 之外的所有其他命令都运行良好。

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building SpringMVC Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.222 s
[INFO] Finished at: 2014-03-24T13:02:22+05:30
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: 1 problem was encountered while building the effective model
[ERROR] [FATAL] Non-parseable POM C:\Users\suresh\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\2.5\maven-clean-plugin-2.5.pom: end tag name </head> must be the same as start tag <meta> from line 4 (position: TEXT seen ...<meta http-equiv="pragma" content="no-cache">\r\n</head>... @5:8)  @ line 5, column 8
[ERROR] -> [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/PluginResolutionException

最佳答案

似乎您的 clean 插件在下载时损坏了。只需完全删除 C:\Users\suresh\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\2.5 目录,然后重试。

关于java - 无法运行 mvn clean,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22603439/

相关文章:

java - 在 jframe 中显示 jpanel 的图形界面

Java - 设置上下文属性(ServletContextListener)

java - 从 pom.xml 获取项目版本

java - 使用jsp从数据库检索数据(Hibernate + Spring + Maven)

java - 在 Netbeans 中生成 Javadoc 被禁用

java - mockito 验证多态方法

java - 如何使用spring数据在mongo中运行js文件

java - 我需要java数组来csharp

java - Maven 设置 - 不确定如何处理 JAVA_HOME

maven - 在带有 java src 和 groovy 测试的项目中将 groovy 代码放在哪里,以便仅在 groovy 测试中使用它们?