打包过程中报错如下:

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

  1. [INFO] Scanning for projects...
  2. [INFO]
  3. [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
  4. [INFO]
  5. [INFO] ------------------------------------------------------------------------
  6. [INFO] Building firstSpringBootExample 0.0.1-SNAPSHOT
  7. [INFO] ------------------------------------------------------------------------
  8. [INFO]
  9. [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ firstSpringBootExample ---
  10. [INFO] Deleting D:\workspace2\firstSpringBootExample\target
  11. [INFO]
  12. [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ firstSpringBootExample ---
  13. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  14. [INFO] Copying 0 resource
  15. [INFO] Copying 0 resource
  16. [INFO]
  17. [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ firstSpringBootExample ---
  18. [INFO] Changes detected - recompiling the module!
  19. [INFO] Compiling 1 source file to D:\workspace2\firstSpringBootExample\target\classes
  20. [INFO] -------------------------------------------------------------
  21. [ERROR] COMPILATION ERROR :
  22. [INFO] -------------------------------------------------------------
  23. [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
  24. [INFO] 1 error
  25. [INFO] -------------------------------------------------------------
  26. [INFO] ------------------------------------------------------------------------
  27. [INFO] BUILD FAILURE
  28. [INFO] ------------------------------------------------------------------------
  29. [INFO] Total time: 2.398 s
  30. [INFO] Finished at: 2017-10-01T17:41:26+08:00
  31. [INFO] Final Memory: 13M/232M
  32. [INFO] ------------------------------------------------------------------------
  33. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project firstSpringBootExample: Compilation failure
  34. [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
  35. [ERROR] -> [Help 1]
  36. [ERROR]
  37. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  38. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  39. [ERROR]
  40. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  41. [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. Thread sleep()休眠

    Thread sleep()休眠就是让线程进入休眠状态TIMED_WAITING,sleep("毫秒数"),当休眠时间到了之后继续线程.当然也可以用中断线程interrupt()来 ...

  2. objective-c runtime 开发详情

    目录 概述 对象与类的实质 id与class 继承关系与isa 总结 C函数创建一个OC类 OC类与runtime NSObjectProtocol NSObject NSProxy 一.概述 Obj ...

  3. Dev express 笔记

    1.设置treelist不同行的颜色 void treeList1_CustomDrawNodeCell(object sender, DevExpress.XtraTreeList.CustomDr ...

  4. [洛谷P3321][SDOI2015]序列统计

    题目大意:给你一个集合$n,m,x,S(S_i\in(0,m],m\leqslant 8000,m\in \rm{prime},n\leqslant10^9)$,求一个长度为$n$的序列$Q$,满足$ ...

  5. [poj] 2618 popular cows

    原题 这是一个强连通分量板子题. a thinks b is popular 即为a到b有一条边,要求被所有牛popular的牛的个数. 所求为对图进行强连通分量缩点后,没有出度的强连通分量里的点数( ...

  6. (poj)Sequence Median

    Description Given a sequence of N nonnegative integers. Let's define the median of such sequence. If ...

  7. 7月12号day4总结

    今天学习过程和总结 封装JDBC在src/main/java下com.neuedu下utils建立JDBCUilt.java 进行封装,基于框架的开发要么继承父类要么实现接口 一个方法里只能有一个动态 ...

  8. 在ESXi使用esxcli命令強制关闭VM

    最近學到一個在VMware ESXi 下面強制關閉一個沒有反應的VM的方法, 一般正常都是使用vSphere Client 去控制VM電源, 但是有時會發生即使用裡面的Power Off 按鈕但是還是 ...

  9. 用基于类的通用视图处理表单(Class-based generic views)

    处理表单通常包含3步: 初始化GET(空白的后者预填充的表单) POST非法数据(通常重新显示带有错误信息的表单) POST合法数据(提交数据并重定向) 为了将你从这些烦人的重复步骤中解救出来,Dja ...

  10. ztree 2.0 节点搜索

    最近做了一个简单的功能,树节点的搜索.ztree的版本的2.0,3.X以上的版本请百度解决办法. 1.在setting中增加 function getFontCss(treeId, treeNode) ...