Maven importer should support custom POM filenames or honor maven.pomfile.globPattern
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- java, vscode
调研方向
仅使用 pom-customize.xml 在 VS Code 中重现该项目,并比较 Maven Explorer 的发现机制与 JDT LS / Red Hat Java 的类路径导入。从 Java 语言服务器的 Maven 导入器以及 maven.pomfile.globPattern 的行为入手;自定义 POM 被导入且 RestController 诊断消失时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Problem
A Maven Java project uses pom-customize.xml instead of pom.xml.
Maven itself works:
mvn -f pom-customize.xml compile
The VS Code Maven extension can be configured to discover it:
{
"maven.pomfile.globPattern": "**/{pom.xml,pom-customize.xml}"
}
But the Java language server does not import the Maven classpath from pom-customize.xml. Java files then show false diagnostics such as:
RestController cannot be resolved to a type
Example import:
import org.springframework.web.bind.annotation.RestController;
## Expected behavior
The Java language server should either:
1. Honor maven.pomfile.globPattern, or
2. Provide a Java setting such as java.import.maven.pomfile.globPattern, or
3. Support custom Maven POM file names when Maven for Java has already discovered them.
## Actual behavior
Maven Explorer can discover the custom POM, but JDT LS / Red Hat Java does not import the project classpath unless the build file is named pom.xml.
## Environment
- VS Code
- Extension: redhat.java version 1.55.0
- Extension: vscjava.vscode-maven version 0.45.3
- Java: 21
- Maven project file: pom-customize.xml
- No pom.xml in project root
## Workarounds tried
- maven.pomfile.globPattern
- maven.executable.options: -f pom-customize.xml
- .mvn/maven.config with -f pom-customize.xml
These help Maven commands/explorer, but do not fix Java language server diagnostics.
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 9 分钟
- 30 天内合并 PR
- 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redhat-developer/vscode-java 的其他 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
redhat-developer/vscode-java#4509 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
redhat-developer/vscode-java#4426 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4506 · 3 条评论 · 4 个 reaction ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4505 · 2 条评论 · 2 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 52/100
redhat-developer/vscode-java#4504 · 3 条评论 · 1 个 reaction ·
查看 redhat-developer/vscode-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·