IDEA 编译器错误 未知版本"8",不会为编译器提供版本设置



我试图在IDEA中运行jetty:run-exploded -f pom.xml,但在编译时出现错误Unknown version '8', no version setting will be given to the compiler。我该怎么修?

错误消息

项目结构

设置java编译器

我在pom.xml中发现了问题
<source><target>元素中的8更改为1.8

正确的xml显示如下:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

最新更新