[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
本人环境为jdk1.8
出现问题原因:导入maven包
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
解决办法 将jre更换成jdk
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1)
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1aHR0cDovL2ltYWdlczIwMTUuY25ibG9ncy5jb20vYmxvZy8xMDc5NDcyLzIwMTYxMi8xMDc5NDcyLTIwMTYxMjEzMTI1NDM3MzM5LTEzOTUxMDM0MzAucG5n)
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1)
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1aHR0cDovL2ltYWdlczIwMTUuY25ibG9ncy5jb20vYmxvZy8xMDc5NDcyLzIwMTYxMi8xMDc5NDcyLTIwMTYxMjEzMTI1NDU2MTY3LTE1NzM5Mjc3NDEucG5n)
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1aHR0cDovL2ltYWdlczIwMTUuY25ibG9ncy5jb20vYmxvZy8xMDc5NDcyLzIwMTYxMi8xMDc5NDcyLTIwMTYxMjEzMTI1NTE2MzIzLTEwNzM3MTAwMzUucG5n)
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1)
选择好你安装的位置
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1)
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1aHR0cDovL2ltYWdlczIwMTUuY25ibG9ncy5jb20vYmxvZy8xMDc5NDcyLzIwMTYxMi8xMDc5NDcyLTIwMTYxMjEzMTI1NjA4MjYxLTc4ODA0OTc2MC5wbmc=)
点击确定--》点击finish
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1aHR0cDovL2ltYWdlczIwMTUuY25ibG9ncy5jb20vYmxvZy8xMDc5NDcyLzIwMTYxMi8xMDc5NDcyLTIwMTYxMjEzMTI1NjE4ODA4LTE2Nzk2MjYxNjcucG5n)
![Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]](https://image.shishitao.com:8440/.jpg?w=700&webp=1)
选择jdk 点击OK 完成
再次导入:maven install
OK
本文章有很多不足之处,希望大家多多指正。欢迎大家转载,请注明出处!码农打字不易,敬请谅解,谢谢!