redhat-developer / redhat-developer/vscode-java
Maven sub modules do not update when parent pom.xml is edited
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
[provide a description of the issue]
When adding or removing modules in the top pom.xml, the JAVA DEPENDENCIES which depends on Language Support for Java(TM) by Red Hat(redhat.java) is not updated even after VSCode is restarted.
Environment
- Operating System: Windows 10 Pro 1809 OS build 17763.379
- JDK version: Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
- Visual Studio Code version: 1.32.3(user setup)
- Java extension version: Language Support for Java(TM) by Red Hat(redhat.java) 0.41.0, Java Dependency Viewer(vscjava.vscode-java-dependency) 0.3.0
Steps To Reproduce
- Manually create a maven project with several sub modules. Each sub module has its own folder and src/main/java inside its own folder.
- Edit the parent pom.xml, to add or remove modules. There is no change in the JAVA DEPENDENCIES. Even do
Update project configurationto any pom.xml has no effect. - In src/main/java of the sub modules, create empty class with main method. Open the class in the VSCode, if a module does not appears in the JAVA DEPENDENCIES, no "Run | Debug" line appears on the top of main method.
- However, by searching the opened workspace in workspace storage(%APPDATA%\Code[ - Variant]\User\workspaceStorage), like(I have grep.exe on my Windows):
grep -e "test-vscode-maven" %APPDATA%\Code\User\workspaceStorage\* -r
There would be some results like:
.......AppData\Roaming\Code\User\workspaceStorage\e8caf83cfcdbff47843f66c1e0d4be69/workspace.json: "folder": "...........test-vscode-maven/module3"
And manually remove ".......AppData\Roaming\Code\User\workspaceStorage\e8caf83cfcdbff47843f66c1e0d4be69\redhat.java" folder,
Then restart VSCode, the problem solved. - From the attach logs, do
Java: Clean the Java language server workspacecould also solve the problem, I find this when I'm going to commit this bug. It's still a reproducible problem.
[attach a sample project reproducing the error]
https://github.com/jchprj/test-vscode-maven
Current Result
There is no change in the JAVA DEPENDENCIES.
Expected Result
There should be changes corresponding the modules in parent pom.xml.
Additional Informations
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Reproduce el problema con el proyecto test-vscode-maven vinculado añadiendo y eliminando módulos en el pom.xml principal y, después, inspecciona cómo la vista Java Dependencies gestiona el cambio. Compara Update project configuration y Java: Clean the Java language server workspace; se considera hecho cuando las dependencias y los enlaces de Run/Debug reflejan los módulos actuales sin eliminar manualmente el almacenamiento del workspace.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- build-system
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100