MavenArchiver.getManifest()中的m2e错误 [英] m2e error in MavenArchiver.getManifest()

查看:101
本文介绍了MavenArchiver.getManifest()中的m2e错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在STS中看到一个错误,不确定如何调试它.到处搜索时,我只看到模糊的错误引用,没有解决方案.

I am seeing an error in my STS and am not sure how to debug it. Searching around I only see vague references to the error and no solutions.

错误是:

org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject, org.apache.maven.archiver.MavenArchiveConfiguration) pom.xml/<maven projectName>第1行Maven配置问题

org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject, org.apache.maven.archiver.MavenArchiveConfiguration) pom.xml /<maven projectName> line 1 Maven Configuration Problem

问题:任何人都可以就如何获取有关该问题的更多信息以进一步调试它或任何可能的解决方案提供任何建议吗?

Question: Can anyone give any suggestions on how to get more information on the issue in order to debug it further or any possible solutions?

也许关于方法功能的更多上下文.与MavenArchiver.getManifest()方法关联的javadoc不太详细,我看不到任何堆栈跟踪.我已经尝试过对该项目及相关项目进行多次刷新和更新,包括清除本地m2存储库.

Maybe some more context on what the functionality of method is. The javadoc associated with the MavenArchiver.getManifest() method is not very detailed and there is no stack trace that I see. I've tried several refreshes and updates of the project and associated projects including clearing my local m2 repo.

STS信息:

  • 版本:3.7.3.释放
  • 内部版本号:201602250940
  • 平台:Eclipse Mars.2(4.5.2)

m2e信息:

  • 版本:1.6.2.20150902-0002

推荐答案

在将maven-jar-plugin更新到最新版本(在撰写本文时) 3.0.2 后,我遇到了相同的问题.
Eclipse 4.5.2 开始用org.apache.maven.archiver.MavenArchiver.getManifest错误和 Maven > 更新项目标记pom.xml文件..无法修复它

I encountered the same issue after updating the maven-jar-plugin to its latest version (at the time of writing), 3.0.2.
Eclipse 4.5.2 started flagging the pom.xml file with the org.apache.maven.archiver.MavenArchiver.getManifest error and a Maven > Update Project.. would not fix it.

简单的解决方案:降级到2.6版本
确实,可能的解决方案是回到版本 2.6 ,然后对该项目进行进一步的更新将消除任何错误.但是,这不是理想情况,并且可能有更好的解决方案:更新m2e扩展(Eclipse Maven集成).

Easy solution: downgrade to 2.6 version
Indeed a possible solution is to get back to version 2.6, a further update of the project would then remove any error. However, that's not the ideal scenario and a better solution is possible: update the m2e extensions (Eclipse Maven integration).

更好的解决方案:更新Eclipse m2e扩展
帮助> 安装新软件..,添加一个新的存储库(通过 Add .. 选项),指向以下URL:

Better solution: update Eclipse m2e extensions
From Help > Install New Software.., add a new repository (via the Add.. option), pointing to the following URL:

  • https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.2/N/LATEST/

然后照常执行更新向导.然后,Eclipse将需要重新启动.然后,在有关的Maven项目上进一步的 Update Project .. 将消除任何错误,然后您的Maven构建可以享受最新的maven-jar-plugin版本的好处.

Then follow the update wizard as usual. Eclipse would then require a restart. Afterwards, a further Update Project.. on the concerned Maven project would remove any error and your Maven build could then enjoy the benefit of the latest maven-jar-plugin version.

附加说明
出现此问题的原因是,从版本 3.0.0 开始,相关组件

Additonal notes
The reason for this issue is that from version 3.0.0 on, the concerned component, the maven-archiver and the related plexus-archiver has been upgraded to newer versions, breaking internal usages (via reflections) of the m2e integration in Eclipse. The only solution is then to properly update Eclipse, as described above.
Also note: while Eclipse would initially report errors, the Maven build (e.g. from command line) would keep on working perfectly, this issue is only related to the Eclipse-Maven integration, that is, to the IDE.

这篇关于MavenArchiver.getManifest()中的m2e错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆