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.
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).
Better solution: update Eclipse m2e extensions
From Help > Install New Software.., add a new repository (via the Add.. option), pointing to any of the following URLs:
https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.2/N/LATEST/ or
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.2/N/LATEST/
————Stack Overflow
大概是:
我在更新maven-jar-plugin到最新版本后(在撰写本文时)遇到了同样的问题3.0.2。
Eclipse 4.5.2开始pom.xml使用org.apache.maven.archiver.MavenArchiver.getManifest错误标记文件,并且Maven > Update Project ..无法修复它。
简单的解决方案:降级到2.6版本
确实可能的解决方案是返回版本2.6,项目的进一步更新将删除任何错误。但是,这不是理想的情况,可以使用更好的解决方案:更新m2e扩展(Eclipse Maven集成)。
更好的解决方案:更新Eclipse m2e扩展
从Help > Install New Software ..,添加一个新的存储库(通过Add ..选项),指向以下任何URL:
https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.2/N/LATEST/ 要么
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.2/N/LATEST/
然后像往常一样关注更新向导。Eclipse然后需要重启。
遇到过一样的问题,解决方法是将项目单独放在一个workspace,然后Maven > Update Project,更新速度会比较慢,耐心等待。