redhat-developer / redhat-developer/vscode-java

Maven dependency with classifier not resolved correctly in vscode

Open
#1,742 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Maven
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I have a Maven dependency with <type>jar</type> and <classifier>idl</classifier> but instead of my -idl.jar classes being resolved in vscode, it's actually the classes of the main artifact that are visible. When i build the project with mvn install or w/e on the CLI, it's working correctly.

Environment
  • Operating System: openSUSE Leap 42.2
  • JDK version: 11.0.8, 2020-07-14
  • Visual Studio Code version: 1.50.0, 2020-10-07
  • Java extension version: 0.72.0, [2020-12-02]
Steps To Reproduce
  1. create 2 maven projects
  2. use some plugin to export a jar with a different classifier (tests for example) in project 1
  3. import project 1 in project 2 with that classifier
  4. try to import a class that's only visible in that classifier

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the problem with the two Maven projects described in the issue, including a dependency with the idl classifier. Start by tracing how the Java extension resolves Maven dependencies, then verify that the classifier-specific classes—not the main artifact classes—are available in VS Code while CLI builds remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.