新建maven工程报错,该怎么解决?

具体情况是这样的,公司jdk为1.6 ,eclipse为kepler版本 ,为了和他们俩不冲突,我下载了maven3.2.5,然后各种配置。。。。。

新建maven项目pom第一行报错:org/apache/maven/plugins/war/WarMojo : Unsupported major.minor version 51.0

然后下面的plugin标签:Multiple annotations found at this line:

  • CoreException: Could not get the value for parameter compilerId for plugin execution default- testCompile: TypeNotPresentException: Type org.apache.maven.plugin.compiler.TestCompilerMojo not present: UnsupportedClassVersionError: org/apache/maven/plugin/compiler/TestCompilerMojo : Unsupported major.minor version 51.0
  • Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven- compiler-plugin:3.7.0:testCompile (execution: default-testCompile, phase: test-compile)
  • 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
  • Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven- compiler-plugin:3.7.0:compile (execution: default-compile, phase: compile)

我真的不知道该怎么解决,网上都说jdk版本和maven冲突,我按照maven官网给出的jdk'版本对应要求下载的3.2.5 为什么就不行了呢,官网是假的?

降低 maven 编译插件的版本 maven- compiler-plugin:3.7.0
在pom.xml里面配置
列表在这儿

https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin

查看一下jdk的版本,检查一下Javahome的配置。或者重新安装。