maven compilation error: Failed to execute goal org.apache.maven.plugin...error compiling

I upgraded to jdk11 some time ago, and I recently ran an old project with jdk8. It can run locally, but when packaging it, I get an error.
Insert image description here

The reason is very simple, that is, the jdk version is inconsistent

You need to check a few places

1、setting
Insert image description here
2、project structure
Insert image description here
3、maven
Insert image description here
Insert image description here

Just set all the above jdk places to be consistent

Done

Guess you like

Origin blog.csdn.net/qq_33709582/article/details/127915751