在使用maven打包的时候碰到了这个错误:
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
解决办法:
在pom.xml中的build----》plugins中添加
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<!--指定你的jdk地址-->
<executable>
D:\Program Files\Java\jdk1.8.0_162\bin\javac.exe
</executable>
</configuration>
</plugin>