Skip to content
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 test scope dependency problem #777

Closed
Eskibear opened this issue Jan 26, 2019 · 4 comments
Closed

maven test scope dependency problem #777

Eskibear opened this issue Jan 26, 2019 · 4 comments

Comments

@Eskibear
Copy link
Contributor

From microsoft/vscode-maven#165 by @fssrepository


v 1.29.1

Steps to Reproduce:

I have the following two dependencies in maven:

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
</dependency>

<dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
</dependency>

Although test scope is not transitive dependency it includes org.junit - suggested in the official spring documentation. - and it's working on netbeans 8.2

I have got several issues related to test packages, that org.junit / org.springframework.security package is missing. Pls. notice I'm talking about two different independent test dependencies which contain different packages and include different dependencies.

If I comment out one of the 'test', wait some time until VsCode finishes its task triggered by the change and add the line back.

All my issues will be gone, even if I restart the vs code.

I'm not sure whether it's related to maven for java, or the vscode parsing process.

@Eskibear Eskibear changed the title Code Issues 14 Pull requests 0 Projects 0 Wiki Insights Settings maven test scope dependency problem maven test scope dependency problem Jan 26, 2019
@fbricon
Copy link
Collaborator

fbricon commented Jan 29, 2019

Can't reproduce the issue. I suggest you try the Java: Force Java Compilation command. If it doesn't work, then right click on your pom.xml and try the Update project configuration menu. And if that doesn't work, then the nuclear option: execute the Java:clean the java language server workspace.

And BTW, you should always explicitly declare the dependencies you directly use, to guarantee your project will always compile.

@fbricon
Copy link
Collaborator

fbricon commented Jan 25, 2021

is this still an issue?

Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.

@XuPengfei-1020
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants