我试图在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>