redhat-developer / redhat-developer/vscode-java

Working Maven project reports multiple errors in VSCode and will not build

Đang mở
#1,232 61 bình luận 11 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Maven
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ả

I have a simple working Java Maven project. This project builds (assuming you have Java and Maven setup) - with:

mvn clean install

And the jar file runs as expected.

However, when I open it in VSCode (I have the Java Extension pack installed) - I see 105 "Problems" reported in the pom.xml:

  • 4x "Failed to read artifact descriptor for ..."
  • The rest "Missing artifact ..."

This appears to prevent most of the VSCode Java tools from working - I can't build and debug. Intellisense seems to be sketchy/intermittent. And so on.

Environment
  • Operating System: Windows 10
  • JDK version: OpenJDK 11.0.5.10
  • Visual Studio Code version: 1.41.1
  • Java extension version: 0.55.0
Steps To Reproduce
  1. Extract the attached zip file to a folder
  2. Open the folder in VSCode and inspect the Problems tab
  3. Attempt to build the project

vsc-java-test.zip

To prove Maven works
  1. Extract the attached zip file to a folder
  2. Open a bash or cmd window, cd to the folder and run mvn clean install
  3. Copy the generated thularest-1.0.jar file from <folder>/target to <folder>/bin
  4. cd to /bin and run ./rest-start.sh
  5. Crowse to http://localhost:8080/api/hello

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện báo cáo bằng vsc-java-test.zip đính kèm: mở dự án Maven trong VSCode, kiểm tra tab Problems và so sánh với mvn clean install trong shell. Truy vết quá trình nhập dự án và phân giải dependency của Java extension từ các chẩn đoán được báo cáo; hoàn tất khi dự án hợp lệ không còn hiển thị các lỗi artifact bị thiếu và các công cụ build/debug Java hoạt động.

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, vscode
Lĩnh vực
build-system, developer-experience, tooling
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
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.