redhat-developer / redhat-developer/vscode-java

Handle module projects with separate module-info.java for main and test sources

オープン
#2,116 コメント 8 件 リアクション 0 件 担当者 1 名 GitHub で見る

@testforstephen がすでに取り組んでいます。

2021年9月26日 から。

JPMS
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

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.

image

The same project works in maven command line. There should be some gap in the JDT compiler that needs to be fixed.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。