mvn clean install -X -Dmaven.test.skip=true -P dev 打包报错:
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

idea,项目,maven 也设置了统一的jdk,还是报错,

解决方法1:
在maven的setting.xml 文件 <profiles> 标签中加入指定JDK的版本,

<profile>
<id>JDK-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>

解决方法2:

在项目的pom.xml 文件加入maven插件,<plugins>中加入jdk路径

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<executable>
C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe(你的安装路径)
</executable>
</configuration>
</plugin>

最新文章

  1. Adobe Flash builder 4的序列号
  2. oracle 报警日志详解
  3. 需要一个策略文件,但在加载此媒体时未设置checkPolicyFile标志
  4. 使用Access-Control-Allow-Origin解决跨域
  5. 利用 NSSortDescriptor 对 NSMutableArray 排序
  6. 使用mysqli_stmt类
  7. socket 和 SocketServer 模块
  8. 微软职位内部推荐-Senior Development Lead
  9. 关于在c#中引用外部dll文件,在页面中找不到命名空间
  10. OpenStack Cinder组件支持的块存储设备表
  11. 键盘工具栏的快速集成--HcCustomKeyboard
  12. SQL Server :理解GAM和SGAM页
  13. [Python]根据地址从maps文件中找相应的库名
  14. 浅谈TCP IP协议栈(三)路由器简介
  15. BIOS备忘录之IIC(touchpad)设备
  16. 选择 Delphi 2007 ( CodeGear Delphi 2007 for Win32 Version 11.0.2837.9583 ) 的理由
  17. hive mysql 初始化
  18. ASP.NET MVC下载excel文档
  19. 用python做数值计算
  20. caffe+win7+vs2013 仅CPU环境安装

热门文章

  1. SpringCloud2.0 Turbine 断路器集群监控 基础教程(九)
  2. selenium 全天课整理(二)
  3. Dynamics 365 目录
  4. nginx配置文件服务器 linux
  5. windows nginx 目录配置
  6. Centos7 docker pull速度特别慢
  7. learning java AWT 右键菜单
  8. while循环实现十进制转二进制
  9. 10分钟用Python爬取最近很火的复联4影评
  10. UVA 1613 K度图染色