redhat-developer / redhat-developer/vscode-java

Maven and Java Build Status Colliding

Đang mở
#1,293 3 bình luận 0 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'm not entirely sure when this started happening or if reporting this issue on the wrong Java extension, but I believe it has been at least a week or two, maybe longer. I use versions-maven-plugin from org.codehaus.mojo to automatically change my versions whenever I package my project. Up until recently, this has never been an issue.

The issue I'm experiencing is that I frequently (not always) run into an error while trying to package my project. What I believe is happening, is that vscode is automatically rebuilding as soon as it registers that the version has changed. The problem with this is I think is that Maven is still building, and they sometimes run into the issue of each messing with the same class file at the same time.

Example error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar (default-jar) on project osrs-core: Error assembling JAR: java.lang.reflect.InvocationTargetException: /Users/palidino/Desktop/BattleScape/server/osrs-core/target/classes/com/palidinodh/osrscore/model/item/ItemArray.class -> [Help 1]
2nd package attempt, no changes:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project osrs-core: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile failed.: NullPointerException -> [Help 1]
3rd attempt:
No errors. Sometimes takes more attempts, sometimes less.

Environment
  • Operating System: MacOS Catalina
  • JDK version: 1.8.0_191-b12
  • Visual Studio Code version: 1.42.1
  • Java extension version: 0.57.0
Steps To Reproduce
  1. Use org.codehaus.mojo build-helper-maven-plugin and versions-maven-plugin in build plugins during package phase to update versions.
  2. When the versions get changed, the java build status server is activated while maven is still working.
  3. Sometimes get an error.

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

Bắt đầu bằng cách tái hiện giai đoạn package của Maven với build-helper-maven-plugin và versions-maven-plugin trên các phiên bản macOS, JDK, VS Code và tiện ích mở rộng Java được báo cáo. Điều tra việc kích hoạt máy chủ trạng thái build Java sau khi thay đổi phiên bản trong khi Maven vẫn đang chạy; issue được hoàn tất khi việc packaging lặp lại không còn tạo ra các lỗi đồng thời trên tệp class.

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, devtools
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

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.