redhat-developer / redhat-developer/vscode-java
Regular error "Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available"
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
(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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi lifecycle-mapping trong một dự án Java có pom.xml, đặc biệt khi các tệp Java gặp vấn đề biên dịch, và kiểm tra nhật ký của extension. Kiểm tra lệnh Maven → Update Project Configuration và hành vi của lệnh này khi pom.xml không phải là tệp đang hoạt động; được coi là hoàn tất khi lỗi gây hiểu nhầm không còn xảy ra hoặc việc cập nhật cấu hình được thử một cách đáng tin cậy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, typescript, vscode
- Lĩnh vực
- build-system, developer-experience
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100