redhat-developer / redhat-developer/vscode-java
Regular error "Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available"
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
(Originally reported in https://github.com/Microsoft/vscode-maven/issues/115 by @lashchev )
Describe the bug
Very often I get this error: Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available. To enable full functionality, install the lifecycle mapping and run Maven->Update Project Configuration.
The strangest thing is that it happens when there were no updates in pom.xml or any other project-level files, when I am just editing *.java files. Sometimes it happens at the same time when "Language Support for Java" extension has issues parsing the files and dumps some errors in the log.
Also, "Maven->Update Project Configuration" (and Shift+Alt+U) works for me only if I have pom.xml open and it's window is active (which is unexpected).
Even "Maven->Update Project Configuration" does not always work for me.
First I typically need to fix all Java compilation issues and then I need to re-open VSCode and let it sit for a few minutes - then "Update Project Configuration" will start working. Sometimes I need to restart VSCode 2 or 3 times to finally make it work though.
Since VSCode restart fixes the issue - the recommendation to "install the lifecycle mapping" is pretty misleading in the message.
To Reproduce
It happens randomly, often when opening Java project that has compilation issues, but can appear while editing already opened project.
Expected behavior
Error shouldn't happen and if the only fix is to "Update configuration" - then it should be attempted automatically.
Environments (please complete the following information as much as possible):
- OS: Windows 10 v1803
- VS Code version: 1.25.1
- Extension version 0.10.0
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在包含 pom.xml 的 Java 项目中重现 lifecycle-mapping 错误,尤其是在 Java 文件存在编译问题时,并检查扩展日志。检查 Maven → Update Project Configuration 命令,以及 pom.xml 不是活动文件时的行为;当误导性错误不再发生,或配置更新能够可靠地尝试时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript, vscode
- 领域
- build-system, developer-experience
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100