打包过程中报错如下:

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK

[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building firstSpringBootExample 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ firstSpringBootExample ---
[INFO] Deleting D:\workspace2\firstSpringBootExample\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ firstSpringBootExample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ firstSpringBootExample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\workspace2\firstSpringBootExample\target\classes
[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.398 s
[INFO] Finished at: 2017-10-01T17:41:26+08:00
[INFO] Final Memory: 13M/232M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project firstSpringBootExample: 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

问题原因:

在IDE上运行项目是使用的jre,但是maven打包项目需要使用JDK

问题解决:

Window --->preferences  --->java   --->Installed JREs ---->Add一个JDK进来

然后在打包的过程中:应用JDK进行maven打包即可。

具体打包过程请详见:http://www.cnblogs.com/sxdcgaq8080/p/7617547.html

【maven】maven的web项目打包报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK的更多相关文章

  1. 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:R ...

  2. 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 th ...

  3. maven打包错误:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    [INFO] Scanning for projects...[INFO]                                                                ...

  4. No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? idea maven 打包报错问题解决

    mvn clean install -X -Dmaven.test.skip=true -P dev 打包报错:No compiler is provided in this environment. ...

  5. Maven构建项目出现No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 你应该 ...

  6. Maven No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 问题

    maven编译项目时出错,提示信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3 ...

  7. maven No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    maven install项目时出错,提示信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-pl ...

  8. Maven异常: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK解决(能力工场小马哥)

    问题描述: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JD ...

  9. Maven错误:[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?的解决方法

    错误: [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather tha ...

随机推荐

  1. webpack + less

    使用less需要安装 'style-loader','css-loader','less-loader' 三个loader. 安装之后在webpack.config.js配置 const path = ...

  2. 最小生成树 $Kruskal$ 算法

    #include <bits/stdc++.h> using namespace std; const int maxn = 5e5 + 10; int h[maxn], v[maxn], ...

  3. .Net MVC断点进不去

    .Net MVC断点进不去 1.httpget  httppost 2.启动项设为UI 3.基于页面没错误的情况下

  4. es6+最佳入门实践(4)

    4.函数扩展 4.1.参数默认值 默认参数就是当用户没有传值的时候函数内部默认使用的值,在es5中我们通过逻辑运算符||来实现 function Fn(a, b) { b = b || "n ...

  5. makefile语法

    makefile很重要 什么是makefile? 或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和professional 的程 ...

  6. sql 取一张表的全部外键

    select a.name as 约束名, object_name(b.parent_object_id) as 外键表, d.name as 外键列, object_name(b.reference ...

  7. 我对webform的整改。

    对于webfom,一种写法,将所有业务单元封装在一个pagebase里面,所有的页面继承自pagebase这个service外观,这样的结果就是,所有的页面单元上代码量会非常少.最大程度减少耦合,而最 ...

  8. panel(NOIP模拟赛Round 4)

    好吧,,这道题..本来以为挺难的.打了个暴力bfs+hash(期望得分30,实际得分30) 奇特的是,这道题如果不用hash(期望得分20,实际得分100),好吧数据实在是太水了(不会T吗?) 然后我 ...

  9. MFC中使用sqlite3操作数据库

    需要用到的文件有sqlite3.h .sqlite3.dll.sqlite3.lib.网上很多人分享下载地址这里不再赘述. 将这三个文件拷贝到自己新建MFC项目目录下,在解决方案窗口下 添加现有项,选 ...

  10. Linux USB驱动框架分析【转】

    转自:http://blog.csdn.net/jeffade/article/details/7701431 Linux USB驱动框架分析(一) 初次接触和OS相关的设备驱动编写,感觉还挺有意思的 ...