木初老狗 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条回答 默认 最新

  • 爱码少年 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 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题