zoukankan      html  css  js  c++  java
  • maven install 报错 No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    1、控制台打印信息

    [INFO] Scanning for projects...
    [INFO] 
    [INFO] ---------------------< org.cqupt.mauger:Resource >----------------------
    [INFO] Building Resource Maven Webapp 0.0.1-SNAPSHOT
    [INFO] --------------------------------[ war ]---------------------------------
    [INFO] 
    [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ Resource ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 2 resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ Resource ---
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 3 source files to D:demo	argetclasses
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR : 
    [INFO] -------------------------------------------------------------
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [INFO] 1 error
    [INFO] -------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.656 s
    [INFO] Finished at: 2018-11-06T02:59:02+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project Resource: Compilation failure
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [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
    

    2、修改 Install JREs,选用 jdk,移除 jre

    参考:https://blog.csdn.net/lslk9898/article/details/73836745

  • 相关阅读:
    53分(我的所有)请教:关于ClientDataSet新增记录问题(请富翁们关注!谢谢)
    DBGrid显示行号的几种方法
    现在序号加上,但怎么控制这一列不能拖动,换句话说不能获取焦点?
    Delphi
    巧妙修复delphi文件关联
    cxGrid中有没有办法操作单个cell是否只读?
    delphi cxgrid 使用方法
    Delphi XE2 的控件安装方法。
    舟山牙医 君子慎独 让你的DBGrid竖着站
    DELPHI程序的自动升级功能的实现(AUTOUPDATE使用指南)
  • 原文地址:https://www.cnblogs.com/wumz/p/9912930.html
Copyright © 2011-2022 走看看