redhat-developer / redhat-developer/vscode-java
Maven project inside another maven project not recognized
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
When you have a maven project inside another maven project, only the top level project is properly recognized in the java projects view. However, if the sub-project is opened in another window by itself, the project is properly recognized
Environment
- Operating System: Fedora 38
- JDK version: openjdk 17.0.7
- Visual Studio Code version: 1.81.0
- Java extension version: 1.21.0
Steps To Reproduce
- Create new maven project (using maven for java extension)
- Create new maven project inside project from step 1. Example structure below:
test_project/
src/
main/
java/
TestMain.java
pom.xml
sub_project/
src/
main/
java/
SubMain.java
pom.xml
- Import Java Projects into Workspace
- Observe only
test_projectis properly imported in this case - Open a new window: File > New Window
- Inside new window, open
sub_project: File > Open Folder > selectsub_project - Observe
sub_projectcan now be recognized as a java project
Current Result
Only top level projects are recognized, projects inside projects are not. This leads to the warning SubMain.java is not on the classpath of project test_project, only syntax errors are reported and many features of the extension not working
Expected Result
Projects are recursively detected by their pom files and the extension features can be used for projects inside projects
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 issue 中描述的嵌套 pom.xml 文件重现 workspace,然后将 Import Java Projects 与仅打开 sub_project 进行比较。首先跟踪项目导入入口,以及 extension 如何发现 pom.xml 文件。当嵌套项目能够递归识别,并且 SubMain.java 不再报告自己位于 classpath 之外时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- build-system, devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100