新建java Maven项目报错 CoreException: Could not get the value for parameter compilerId for plugin executio

新建Java Maven项目一般都会报错

新建java Maven项目报错 CoreException: Could not get the value for parameter compilerId for plugin executio

Description    Resource    Path    Location    Type
CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: TypeNotPresentException: Type org.apache.maven.plugin.compiler.CompilerMojo not present: UnsupportedClassVersionError: org/apache/maven/plugin/compiler/CompilerMojo : Unsupported major.minor version 51.0    pom.xml    /demo2    line 43    Maven Project Build Lifecycle Mapping Problem
 

新建java Maven项目报错 CoreException: Could not get the value for parameter compilerId for plugin executio

最快的解决办法:

第一步:将第一行删除

新建java Maven项目报错 CoreException: Could not get the value for parameter compilerId for plugin executio

第二步:将build节点删除

新建java Maven项目报错 CoreException: Could not get the value for parameter compilerId for plugin executio

第三步:更新配置文件,如图 错误解决

新建java Maven项目报错 CoreException: Could not get the value for parameter compilerId for plugin executio