redhat-developer / redhat-developer/vscode-java
Handle module projects with separate module-info.java for main and test sources
@testforstephen đang làm issue này rồi.
Từ ngày 26/9/2021.
- 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ả
Here is a Java 11 maven module project: https://github.com/microsoft/gctoolkit. The project is a multi-module maven project. One submodule is "api", see its file structure as follows. It describes the module-info.java file in the main sources and the test sources respectively.
api
├───src
│ ├───main
│ │ ├───java
│ │ │ │ module-info.java
│ │ │ └───com.microsoft.gctoolkit
│ │ │ GCToolKit.java
│ └───test
│ ├───java
| | | module-info.java
│ │ └───com.microsoft.gctoolkit.test
│ │ Test.java
However, when opening this project in VS Code, it doesn't work. It reports a compile error: "The project was not built due to "Build path contains duplicate entry: 'module-info.java' for project 'api'". Fix the problem, then try refreshing this project and building it since it may be inconsistent". It doesn't support multiple module-info.java files in one Java project.

The same project works in maven command line. There should be some gap in the JDT compiler that needs to be fixed.
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.
Đánh giá
Issue này chưa được đánh giá.