maven工程build过程中报错

当在maven中打包时,报错以下内容:

[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available

[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced

 

解决方案:

1、下载 https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin

2、解压,进入pom文件所在目录,执行mvn clean install

3、再次打包

 

在第二步可能会遇见错误提示:不再支持源选项 5。请使用 7 或更高版本
我本地解决方案是:

1.更换jdk为1.8,保持与之前开发环境jdk一致

2.从https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin下载的压缩包后进行解压,将解压后的pom.xml打开,在<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>后面添加

<maven.compiler.encoding>UTF-8</maven.compiler.encoding>

        <java.version>1.8</java.version>

        <maven.compiler.source>1.8</maven.compiler.source>

        <maven.compiler.target>1.8</maven.compiler.target>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值