redhat-developer / redhat-developer/vscode-java
Handle module projects with separate module-info.java for main and test sources
@testforstephen y travaille déjà.
Depuis le 26/9/2021.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 546
- Merge moyen
- 20 h 1 min
- PR mergées (30 j)
- 11
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.