木初老狗 2018-12-03 08:00 采纳率: 33.3%
浏览 952
已采纳

新建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 为什么就不行了呢,官网是假的?

  • 写回答

2条回答

  • 爱码少年 00fly.online 2018-12-03 08:04
    关注

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

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog