redhat-developer / redhat-developer/vscode-java

Working Maven project reports multiple errors in VSCode and will not build

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

还没有人认领这个 Issue。

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

描述

I have a simple working Java Maven project. This project builds (assuming you have Java and Maven setup) - with:

mvn clean install

And the jar file runs as expected.

However, when I open it in VSCode (I have the Java Extension pack installed) - I see 105 "Problems" reported in the pom.xml:

  • 4x "Failed to read artifact descriptor for ..."
  • The rest "Missing artifact ..."

This appears to prevent most of the VSCode Java tools from working - I can't build and debug. Intellisense seems to be sketchy/intermittent. And so on.

Environment
  • Operating System: Windows 10
  • JDK version: OpenJDK 11.0.5.10
  • Visual Studio Code version: 1.41.1
  • Java extension version: 0.55.0
Steps To Reproduce
  1. Extract the attached zip file to a folder
  2. Open the folder in VSCode and inspect the Problems tab
  3. Attempt to build the project

vsc-java-test.zip

To prove Maven works
  1. Extract the attached zip file to a folder
  2. Open a bash or cmd window, cd to the folder and run mvn clean install
  3. Copy the generated thularest-1.0.jar file from <folder>/target to <folder>/bin
  4. cd to /bin and run ./rest-start.sh
  5. Crowse to http://localhost:8080/api/hello

贡献指南

打开贡献指南

从这里开始

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

调研方向

使用附带的 vsc-java-test.zip 重现该报告:在 VSCode 中打开 Maven 项目,检查 Problems 选项卡,并将其与 shell 中的 mvn clean install 进行比较。根据报告的诊断信息,跟踪 Java extension 的项目导入和依赖项解析;完成的标准是,有效项目不再显示缺少 artifact 的错误,并且 Java 构建/调试工具能够正常工作。

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

评估

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

把新 issue 发到你的邮箱

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