不要将正确的settings.xml传递给Maven Release Plugin

时间:2014-12-04 19:22:04

标签: eclipse maven build

我对eclipse有以下问题,我正在运行mvn安装, 尝试构建我的项目。

不知道怎么处理这个错误

请帮助

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building superman 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-hpi-plugin:1.95:validate (default-validate) @ superman ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-maven) @ superman ---
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Build with Maven 3.0.4 or later. Maven 3.0 through 3.0.3 inclusive do not pass correct settings.xml to Maven Release Plugin.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.032s
[INFO] Finished at: Thu Dec 04 11:24:21 CST 2014
[INFO] Final Memory: 22M/355M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce (enforce-maven) on project superman: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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

2 个答案:

答案 0 :(得分:1)

这意味着您只使用较旧的Maven版本。根据规则,您必须使用Maven 3.0.5+来解决问题。 Maven 3.0 ... 3.0.3的问题从settings.xml到发布插件的信息出现问题。

答案 1 :(得分:0)

毕竟,你必须去

窗GT;偏好> maven>装置>并将其中的设置更改为工作站上的新安装。为什么eclipse将使用新的maven 3.2.3

问题解决了