redhat-developer / redhat-developer/vscode-java

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

Open
#1,232 61 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Maven
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with the attached vsc-java-test.zip: open the Maven project in VSCode, inspect the Problems tab, and compare it with mvn clean install in a shell. Trace the Java extension's project import and dependency resolution from the reported diagnostics; done means the valid project no longer shows the missing-artifact errors and Java build/debug tooling works.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system, developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.