Vscode-java: The container 'Maven Dependencies' references non existing library

Created on 2 May 2018  路  5Comments  路  Source: redhat-developer/vscode-java

I have my .m2 repo folder in a different dive/location and I have updated the same in settings.xml. Maven from command line works fine outside of VSCode. But the extension seems to refer the old location somehow.
I am not even sure how the previous location is 'known' to the extension.

Environment
  • Operating System: Windows 7 Pro
  • JDK version: JDK8
  • Visual Studio Code version: 1.23.0-insiders
  • Java extension version: 0.24.0
Steps To Reproduce
  1. [step 1]
  2. [step 2]

[attach a sample project reproducing the error]
[attach logs]
[Error - 7:50:06 PM] May 2, 2018 7:50:01 PM Error occured while building workspace. Details:
message: The container 'Maven Dependencies' references non existing library 'C:Users.m2repositoryjunitjunit4.8.2junit-4.8.2.jar';code: 964
message: The project cannot be built until build path errors are resolved;code: 0

Current Result

The plugin is referring to the default location to pick up the jars

Expected Result

The plugin should be able to pick up the jars from the right location (moved location)

Additional Informations

I have tried giving the property java.configuration.maven.userSettings to the new location but still get the same error

Maven bug

Most helpful comment

All 5 comments

Can you try to run the "update project configuration" command?

Hi, thanks for the response. I tried it but it appears to be doing nothing and the issue still exist. The log did not reflect anything thro this command. Should I be looking somewhere else specific?

I am trying to replace NetBeans 8.2 as my primary Java IDE with VS Code (I am doing Vue.js frontends and SpringBoot backends these days) and was struggling with this issue yesterday. I also moved my default m2_repo location from the C: drive to a large portable drive and the Code extension refuses to use my user settings override. I did discover that the "update configuration command" fixes the issue but only for the current Code instance. When I restart Code I have to once again run "update project configuration" to get the IDE to recognize the jars that have been moved to my portable drive.

Language Support for Java by Red Hat Extension
0.28.0 (July 3rd, 2018)

MS Visual Studio Code
Version: 1.25.1
Commit: 1dfc5e557209371715f655691b1235b6b26a06be
Date: 2018-07-11T15:43:53.668Z
Electron: 1.7.12
Chrome: 58.0.3029.110
Node.js: 7.9.0
V8: 5.8.283.38
Architecture: x64

@fbricon
Awesome, cleaning up the workspace did the trick! Thanks for the quick feedback. Just as an FYI, on my windows 10 box the directory I cleaned up was located here.

"C:Usersyour_usernameAppDataRoamingCodeUserworkspaceStorage"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marlinla picture marlinla  路  3Comments

protoEvangelion picture protoEvangelion  路  3Comments

shawmanz32na picture shawmanz32na  路  3Comments

gorkem picture gorkem  路  4Comments

larixer picture larixer  路  3Comments