[ERROR] No compiler is provided in this environment. Perhaps you are running on
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
解决方法:在maven目录的conf/setting.xml文件内 补上
<profile>
<id>jdk18</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>
还有可能是maven的版本不匹配导致的,重新 vim .zshrc 修改M2_HOME的maven版本路径并且 source .zshrc,就可以了
还是提示。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project common: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?