【问题标题】:To build this project Maven (or greater) is required构建这个项目需要 Maven(或更高版本)
【发布时间】:2015-10-03 21:22:32
【问题描述】:

我安装了最新版本的 Netbeans (8.0.2),并将 Maven (4.27.1) 作为插件安装(默认情况下)。

当我尝试构建最新版本的 optaplanner (6.3.0) 时出现异常

Building OptaPlanner examples 6.3.0.Final
------------------------------------------------------------------------

--- maven-enforcer-plugin:1.3.1:enforce (enforce-plugin-versions) @ optaplanner-examples ---

--- maven-enforcer-plugin:1.3.1:enforce (enforce-java-version) @ optaplanner-examples ---

--- maven-enforcer-plugin:1.3.1:enforce (enforce-maven-version) @ optaplanner-examples ---
Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
To build this project Maven 3.2.3 (or greater) is required. Please install it.
------------------------------------------------------------------------
BUILD FAILURE
--------------------------------------------------------------

Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-maven-version) on project optaplanner-examples: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

我可以做些什么来构建这个项目?

【问题讨论】:

标签: java maven netbeans


【解决方案1】:

4.27.1 可以是 Netbeans Maven 插件版本,但不是 Maven 版本(目前还没有 Maven 4)。您需要在设置中找出使用的 Maven,如果您安装了 Maven 2(而不是 3),则可能在系统中安装新版本。

【讨论】:

    【解决方案2】:

    在intellij的设置中有一个叫maven的选项,你可以在里面设置intellij应该使用的maven版本。

    我记得默认的 ist 3.10 左右,但如果你安装了 maven(使用其他版本),你可以在 intellij 设置中选择它

    【讨论】:

    • 提到的问题是使用 Netbeans,而不是 Intellij Idea。
    • 哦,抱歉没有阅读整个问题,因为错误信息听起来很熟悉
    猜你喜欢
    • 2013-12-04
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 2013-05-25
    • 2015-05-13
    • 1970-01-01
    • 2014-03-28
    • 2020-12-11
    相关资源
    最近更新 更多