java - 收到错误“构建此项目 Maven 3.6.3(或更高版本)是必需的。请安装它
问题描述
我正在尝试运行 Optaweb Vehicle Routing 应用程序 ( https://github.com/kiegroup/optaweb-vehicle-routing )。当我运行时./runlocally.sh
,我得到以下输出:
VRP dir: /home/[myname]/.optaweb-vehicle-routing
Getting project version...
Project version: 7.42.0-SNAPSHOT
Jarfile ‘optaweb-vehicle-routing-standalone/target/optaweb-vehicle-routing-standalone-7.42.0-SNAPSHOT.jar’ does not exist. Run Maven build now? [y/N]: y
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] OptaWeb Vehicle Routing
[INFO] OptaWeb Vehicle Routing Backend
[INFO] OptaWeb Vehicle Routing Frontend
[INFO] OptaWeb Vehicle Routing Standalone
[INFO] OptaWeb Vehicle Routing Documentation
[INFO] OptaWeb Vehicle Routing Distribution
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OptaWeb Vehicle Routing 7.42.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ optaweb-vehicle-routing ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-plugin-versions) @ optaweb-vehicle-routing ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (ban-blacklisted-dependencies) @ optaweb-vehicle-routing ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (no-duplicate-declared-dependencies) @ optaweb-vehicle-routing ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-java-version) @ optaweb-vehicle-routing ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-maven-version) @ optaweb-vehicle-routing ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
To build this project Maven 3.6.3 (or greater) is required. Please install it.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OptaWeb Vehicle Routing ............................ FAILURE [ 1.258 s]
[INFO] OptaWeb Vehicle Routing Backend .................... SKIPPED
[INFO] OptaWeb Vehicle Routing Frontend ................... SKIPPED
[INFO] OptaWeb Vehicle Routing Standalone ................. SKIPPED
[INFO] OptaWeb Vehicle Routing Documentation .............. SKIPPED
[INFO] OptaWeb Vehicle Routing Distribution ............... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.799 s
[INFO] Finished at: 2020-08-08T13:47:17-07:00
[INFO] Final Memory: 33M/262M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (enforce-maven-version) on project optaweb-vehicle-routing: 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
Maven build failed. Aborting the script.
但是,我知道 Maven 已安装,因为mvn -version
返回:
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/maven
Java version: 1.8.0_265, vendor: Red Hat, Inc, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-1.fc32.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.7.11-200.fc32.x86_64", arch: "amd64", family: "unix"
我该如何摆脱这个错误?
我的操作系统是 Fedora 32,我通过dnf
. 我的 JAVA_HOME 环境变量是空的,如果这与任何事情有关。
解决方案
推荐阅读
- angular - Angular 4:请求的资源上不存在“Access-Control-Allow-Origin”标头
- regex - 如何在记事本++中删除一行中少于11个数字但多于8个数字的行
- node.js - 如何从 Node.js 中的 JSON 过滤键?
- sql-server - 平面文件导入的奇怪结果
- c# - 我如何只获得 MS Translate Text API 的结果?
- mysql - mysql 选择查询(字典搜索)
- r - 使用 Lavaan 的多个数据帧的 R 循环
- angular - 如何以角度动态设置属性?
- python - 映射python List中的常用数据
- cleverhans - 未实现错误:
必须实现 `get_logits` 或必须在 `fprop` 中定义 logits 输出