No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? idea maven 打包报错问题解决
2024-08-26 11:11:13
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>
最新文章
- Adobe Flash builder 4的序列号
- oracle 报警日志详解
- 需要一个策略文件,但在加载此媒体时未设置checkPolicyFile标志
- 使用Access-Control-Allow-Origin解决跨域
- 利用 NSSortDescriptor 对 NSMutableArray 排序
- 使用mysqli_stmt类
- socket 和 SocketServer 模块
- 微软职位内部推荐-Senior Development Lead
- 关于在c#中引用外部dll文件,在页面中找不到命名空间
- OpenStack Cinder组件支持的块存储设备表
- 键盘工具栏的快速集成--HcCustomKeyboard
- SQL Server :理解GAM和SGAM页
- [Python]根据地址从maps文件中找相应的库名
- 浅谈TCP IP协议栈(三)路由器简介
- BIOS备忘录之IIC(touchpad)设备
- 选择 Delphi 2007 ( CodeGear Delphi 2007 for Win32 Version 11.0.2837.9583 ) 的理由
- hive mysql 初始化
- ASP.NET MVC下载excel文档
- 用python做数值计算
- caffe+win7+vs2013 仅CPU环境安装