vscode-maven icon indicating copy to clipboard operation
vscode-maven copied to clipboard

How to add a dependency from one module of a multi-module project?

Open doggy8088 opened this issue 2 years ago • 1 comments

Suggestion

I have a multi-module project in VSCode. I'd like to add a dependency from a sub-module to another sub-module. I try to run Maven: Add a dependency to choose artifact.

image

I can't found any artifact from the list.

image

Is it possible to choose artifact from Local Maven Repository or choose the modules in current project?

Use Cases

When we are in a multi-module project, I hope Maven for VSCode can handle dependency for all sub-modules easily.

Examples

I described in Suggestion section.

doggy8088 avatar Sep 12 '22 03:09 doggy8088

The candidates are fetched from Maven Central Repo using the search API.

from Local Maven Repository

If it's a public artifact also available on Maven Central, I think that's already coverred. So I assume that you want to add a private artifact only installed into you local repository as a dependency. If so, the question is about the UX, do we still search it by vague keywords? Or exact match with artifactId or groupId etc?

choose the modules in current project

That sounds a reasonable use case. I imagine that we list all detected modules and you just pick from it.

Eskibear avatar Sep 27 '22 06:09 Eskibear