UnsupportedClassVersionError: org/apache/maven/plugin/compiler/TestCompilerMojo

I am new to Maven. On Eclipse I am getting following error in pom.xml :-

"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)

  • maven-enforcer-plugin (goal ""enforce"") is ignored by m2e.

  • I have upgraded from Java 1.6 to Java 1.8. So I also started using new maven 3.5.2. And updated maven-compiler-plugin from 2.3.2 to 3.7.0 in super-pom. Kindly help in debugging.

    pom.xml where I am getting error: tag

      <parent>
        <groupId>com.abcdef.xyz</groupId>
        <artifactId>dev-main</artifactId>
        <version>8.1.1-SNAPSHOT</version>
      </parent>
    

    Note: I am able to build successfully on git bash. The error is only shown in pom.xml in Eclipse.


    该错误似乎是由于旧版本的m2e eclipse插件引起的。您可以升级m2e插件或移动到霓虹灯(如果尚未移动),就像在Java 8上一样,Neon适合它。

    链接地址: http://www.djcxy.com/p/87286.html

    上一篇: 来自.NET 3.5的实体框架与SQL CE 4.0

    下一篇: UnsupportedClassVersionError:org / apache / maven / plugin / compiler / TestCompilerMojo