新下载的项目报错:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile

找到相应的pom.xml文件,修改配置

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>

11 代表本地的JDK版本,一定要改成自己的JDK版本