Perhaps you are running on a JRE rather than a JDK
执行mvn install时报错
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?
解决方法
百度搜索大家遇到的问题大多是eclipse环境下没有指定jdk去编译, 而我遇到的时mvn命令行直接编译.
在pom文件中添加:
<build>
...
<plugins>
...
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.7.0_45\bin\javac.exe</executable>
</configuration>
</plugin>
</plugins>
</build>