gpt4 book ai didi

java - 构建失败运行 "mvn clean install"。我刚刚升级了大苏尔

转载 作者:行者123 更新时间:2023-12-03 11:17:45 25 4
gpt4 key购买 nike

mvn 全新安装构建失败

  [INFO] Total time:  1.911 s
[INFO] Finished at: 2020-11-14T19:07:37+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project es-starter: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[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/MojoFailureException
Java & Maven 环境


~ which java
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
➜ ~ mvn -v
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T03:00:29+08:00)
Maven home: /Users/munan/Documents/work/develop/maven/apache-maven-3.6.1
Java version: 1.8.0_192, vendor: Oracle Corporation, runtime: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
环境好像没有问题。
那么导致构建失败的问题出在哪里呢?

最佳答案

BigSur 出于某种原因添加了 JRE 路径,并且
uninstalled the JRE因为我需要 JDK(而不是 JRE)并且它起作用了。

  • 转至/Library/Internet Plug-Ins。
  • 通过执行 rm 删除 JavaAppletPlugin.plugin 目录
    命令作为 root 用户或使用 sudo 工具。
  • 转到/Library/PreferencePanes。
  • 通过执行 rm 命令删除 JavaControlPanel.prefpane
    root 用户或使用 sudo 工具。
  • 关于java - 构建失败运行 "mvn clean install"。我刚刚升级了大苏尔,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64833334/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com