redhat-developer / redhat-developer/vscode-java
Maven sub modules do not update when parent pom.xml is edited
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
[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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
通过在父 pom.xml 中添加和移除模块,使用链接的 test-vscode-maven 项目重现该问题,然后检查 Java Dependencies 视图如何处理此更改。比较 Update project configuration 和 Java: Clean the Java language server workspace;当依赖项和 Run/Debug 链接反映当前模块,且无需手动删除 workspace 存储时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- build-system
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100