redhat-developer / redhat-developer/vscode-java

In a Java/Maven project with modules, java plugin is not able to understand parent dependencies

Đang mở
#4,101 7 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 upstream
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
547
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

I have a Spring Boot project, with JAVA and MAVEN, with different sub-modules

In VSCode the JAVA plugin drives the compilation, and I have configured java.import.maven.enabled": true and java.dependency.syncWithFolderExplorer": true

The compilation result with Java differs from the one obtained with Maven.
For example, with Maven I get a successful compilation, but with JAVA i get some errors.

The JAVA plugin is not able to understand the module's structure.

The structure is as follows

  • parent project -> pom.xml in the root directory of the project
  • modules, each one in each sub-directory
    |- module 1 -> pom.xml
    |- module 2 -> pom.xml

To build a module with maven, i need to pass the argument -am, so that some dependencies in tha parent pom are executed.
It seems the JAVA plugin is not doing it, or not able to recognize it

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áo cáo không nêu tệp nào trong repository, các bài kiểm thử hoặc các entry point. Trước tiên, hãy tái hiện dự án Spring Boot đa mô-đun trong VS Code với các thiết lập Java và Maven được liệt kê, sau đó so sánh việc biên dịch bằng Java plugin với Maven sử dụng -am; được xem là hoàn tất khi các dependency của parent được xử lý nhất quán.

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, spring-boot
Lĩnh vực
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.