[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project miweb: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
意思是JDK有问题,Windows--->Preferences-->搜索框输入install,找到Installed JREs
从上图中可以看出,引用的是jre而不是JDK,换成JDK
然后在打包就可以了:
打包方式:clean package -Dmaven.test.skip=true
原文链接:https://blog.csdn.net/muyeju/article/details/103167274