redhat-developer / redhat-developer/vscode-java
Handle module projects with separate module-info.java for main and test sources
@testforstephen arbeitet bereits daran.
Seit 26.9.2021.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.3k
- Forks
- 546
- Ø Merge
- 20 Std. 1 Min.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.