Working Maven project reports multiple errors in VSCode and will not build
See original GitHub issueI 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
- Extract the attached zip file to a folder
- Open the folder in VSCode and inspect the Problems tab
- Attempt to build the project
To prove Maven works
- Extract the attached zip file to a folder
- Open a bash or cmd window, cd to the folder and run
mvn clean install
- Copy the generated thularest-1.0.jar file from
<folder>/target
to<folder>/bin
- cd to /bin and run
./rest-start.sh
- Crowse to http://localhost:8080/api/hello
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:52 (8 by maintainers)
Top Results From Across the Web
Maven and Gradle support for Java in Visual Studio Code
Open the Command Palette (Ctrl+Shift+P), search for Create Java Project command.
Read more >Issue with Maven project in vs code - Stack Overflow
Open the different logs one by one and try to resolve the errors if found. Set up the correct default JRE/runtime/JDK needed for...
Read more >Apache Maven Tutorial - Vogella.com
If you are running a complex multi-module project build, you can define how the Maven build system should react to errors in one...
Read more >Create Maven Project in Visual Studio Code - YouTube
How to create and #setup # mavenproject and add maven dependency and run the same in # vscode Jenkins CICD Tutorial ...
Read more >Maven Surefire Plugin – Skipping Tests
To skip running the tests for a particular project, set the skipTests property to true. ... You can also skip the tests via...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Issue resolved update Just download lombok annotations support extension in VS Code
works for me. Have you tried to execute the “Clean the Java language server workspace” command?