redhat-developer / redhat-developer/vscode-java

pom.xml reports non-resolvable parent POM error despite local repository having dependencies and IntelliJ IDEA resolving correctly

未关闭
#4,118 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

When using the redhat-developer vscode-java extension in VSCode, I encounter errors in my pom.xml indicating that the parent POM cannot be resolved or dependencies are missing. However, the local Maven repository already contains the required artifacts, and opening the same project in IntelliJ IDEA works perfectly without any errors.
Interestingly, even in VSCode, the reported parent POM is clickable and can be opened normally, despite the error being displayed.
However, inside Java source files, classes, methods, and variables cannot be navigated (Go to Definition does not work), which suggests the Java project classpath is not being built correctly.

Details
  • Error message example:
    Non-resolvable parent POM for ...
  • Dependencies are present in the local Maven repository and not missing
  • IntelliJ IDEA correctly resolves the parent POM and dependencies without issues
  • VSCode plugin might not be correctly loading the custom settings.xml or there could be caching issues
  • "java.maven.downloadSources": true setting does not seem to take effect; source code is not downloaded
  • Maven version 3.6.3 is installed at /Users/yuxuan/SoftWare/maven/apache-maven-3.6.3/bin/mvn on macOS
Relevant settings.json snippet
{
  "java.maven.downloadSources": true,
  "maven.executable.path": "/Users/yuxuan/SoftWare/maven/apache-maven-3.6.3/bin/mvn",
  "java.configuration.maven.userSettings": "/Users/yuxuan/SoftWare/maven/apache-maven-3.6.3/conf/settings.xml"
}

Expected behavior
The plugin should correctly recognize existing dependencies in the local Maven repository without throwing resolution errors

It should properly load and apply the user-specified settings.xml

Source downloading should work as configured

Provide more detailed logs or diagnostics to help troubleshoot issues

Thank you for your hard work and support. Looking forward to a fix.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用提供的 settings.json 值、项目的 pom.xml 以及指定的 Maven 可执行文件,在 VSCode 中复现依赖解析和源代码导航失败的问题。检查扩展的详细日志和诊断信息,以确定是否涉及 settings.xml 加载或依赖缓存。完成的标准是现有的本地依赖能够解析,源代码下载遵循设置,并且 Java 导航能够无错误地工作。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, typescript, vscode
领域
build-system, developer-experience, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
32/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。