Skip to content

For different project types, use the corresponding class provider to resolve the runtime classpath - #281

Merged
Jinbo Wang (testforstephen) merged 1 commit into
masterfrom
jinbo_classpath
Jun 17, 2019
Merged

Jinbo Wang (testforstephen) merged 1 commit into
masterfrom
jinbo_classpath

Conversation

@testforstephen

@testforstephen Jinbo Wang (testforstephen) commented Jun 14, 2019 •

Copy link
Copy Markdown
Contributor

Signed-off-by: Jinbo Wang [email protected]

Fix microsoft/vscode-java-debug#584
Fix microsoft/vscode-java-debug#566

Currently, we're using JavaRuntime.resolveRuntimeClasspath(IJavaProject) API, there are two limitation for it.

  • It used DFS algorithm to deal with dependency. It violates the maven dependency mechanism, which uses BFS to deal with dependency chain.
  • It cannot handle test scope.

The fix is to use the corresponding class provider for different project type to resolve the runtime classpath.

  • maven project - MavenRuntimeClasspathProvider
  • gradle project - GradleRuntimeClasspathProvider
  • eclipse project - StandardClasspathProvider (default)

…resolve the runtime classpath

Signed-off-by: Jinbo Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong classpath at runtime when the maven project is in a folder Adding wrong jar version to the classpath

3 participants