-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven projects do not have access to dependencies from the test scope #2569
Maven projects do not have access to dependencies from the test scope #2569
Comments
I can reproduce it. @snjeza is this related with the m2e migration? |
I can reproduce the issue in the m2e 1.x . You can try the following patch:
|
@snjeza thank you for the suggestion and for the great work you guys are doing. |
@clembo590 you can try the following:
|
@snjeza thank you for this solution. (and sorry for the delay in the response: I got a baby and kind of was not focused on vscode anymore). Your solution: it does work indeed. But Is there any plan to actually fix the issue so that a developper would not have to perform
The main problem I see here is that if a developpers has a "maven settings.xml" provided by a company with other profiles and mirrors etc... then you also have to put all those profiles/mirrors in the file you talked about... Maybe instead of this: |
It is an upstream m2e property
|
At the very least we should include a setting for this. I'm just wondering whether we can go as far as enabling it by default. We might need to consider how Gradle projects behave and whether having a behaviour that might be different is desired. |
If you want to execute them in vscode java, you probably need to set java.import.maven.disableTestClasspathFlag to true. See redhat-developer/vscode-java#2569
If you want to execute them in vscode java, you probably need to set java.import.maven.disableTestClasspathFlag to true. See redhat-developer/vscode-java#2569
Environment
Steps To Reproduce
I have created a public repo so that the issue is easily reproducible:
step1: clone this repo:
step2: run
mvn clean install
-->no issue
step 3: "import the project in vscode"

I get the error
The project was not built since its build path is incomplete. Cannot find the class file for org.slf4j.Logger. Fix the build path then try building this project
The text was updated successfully, but these errors were encountered: