【问题标题】:do not pass correct settings.xml to Maven Release Plugin不要将正确的 settings.xml 传递给 Maven 发布插件
【发布时间】:2014-12-04 19:22:04
【问题描述】:

我有以下关于 eclipse 的问题,我正在运行 mvn install , 尝试构建我的项目。

不知道怎么处理这个错误

请帮忙

[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

【问题讨论】:

    标签: eclipse maven build


    【解决方案1】:

    这仅仅意味着您使用的是较旧的 Maven 版本。根据您必须使用 Maven 3.0.5+ 的规则,这就是问题所在。 Maven 3.0...3.0.3 的问题是从 settings.xml 到产生问题的发布插件的信息存在问题。

    【讨论】:

    • 我正在使用 eclipse,但是我在我的工作站中下载了 maven 3.2.3,我该如何继续解决这个问题。在日食中
    • 我已经在 eclipse 中安装了 maven 插件,我有最新的 maven 3.2.3,我已经将它设置为我的环境变量,
    • 我已经在 eclipse 中安装了 maven 插件,我有最新的 maven 3.2.3,我已经将它设置为我的环境变量,我仍然遇到同样的错误...... eclipse 中有设置吗我需要更改以便使用 maven 3.0.4 或更高版本构建?请告诉我
    • 您是否在命令行上检查了新安装的 Maven 以构建此项目?
    【解决方案2】:

    毕竟,你必须去

    window> 首选项> maven > 安装> 并将其中的设置更改为工作站上的新安装。这就是为什么 eclipse 会使用新的 maven 3.2.3

    问题解决了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-06
      • 2012-05-11
      • 2020-07-02
      • 1970-01-01
      • 1970-01-01
      • 2017-10-21
      • 2022-01-06
      • 1970-01-01
      相关资源
      最近更新 更多