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

    [INFO] Scanning for projects...

    [WARNING]

    [WARNING] Some problems were encountered while building the effective model for com.yusys.pro:NewsManagement:war:0.0.1-SNAPSHOT

    [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 176, column 23

    [WARNING]

    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

    [WARNING]

    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

    [WARNING]

    [INFO]                                                                        

    [INFO] ------------------------------------------------------------------------

    [INFO] Building NewsManagement Maven Webapp 0.0.1-SNAPSHOT

    [INFO] ------------------------------------------------------------------------

    [INFO]

    [INFO] >>> jetty-maven-plugin:8.1.16.v20140903:run (default-cli) > test-compile @ NewsManagement >>>

    [INFO]

    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ NewsManagement ---

    [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

    [INFO] Copying 5 resources

    [INFO]

    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ NewsManagement ---

    [INFO] Changes detected - recompiling the module!

    [INFO] Compiling 9 source files to D:worksheetNewsManagement 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: 2.264 s

    [INFO] Finished at: 2018-01-13T08:06:00+08:00

    [INFO] Final Memory: 9M/153M

    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project NewsManagement: 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

     这个错误是运行环境的错误,意思是运行时在jre上运行,不是在jdk上运行,故而需要更改运行环境切换在jdk上运行。

    解决办法是:window---->preferences选择如下切换

    如果没有添加jdk,则add

    next

    选择jdk的安装包,如下

    然后finish,并勾选第一张图的jdk,点击OK ,运行环境切换完成。

  • 相关阅读:
    wpf数据验证实例及常用方法小结
    wpf自定义colorpicker
    DataGrid绑定Dictionary问题
    DataTemplate和ControlTemplate的关系
    Validation Rule和Binding Group
    WPF converter(包含传递复杂参数)
    【链接】Eclipse的Debug调试技巧
    安装apache服务出错,无法启动此程序,因为计算机中丢失VCRUNTIME140.dll
    apache解压版安装服务
    apache——(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : AH00072: make_sock: could not bind to address [::]:443
  • 原文地址:https://www.cnblogs.com/xiaoyao-001/p/8278322.html
Copyright © 2011-2022 走看看