microsoft / vscode-java-dependency

Manage Java projects in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency
MIT License
152 stars 74 forks source link

Maven module is not loading properly as a Java project when the module directory name is different from it's artifactID #783

Open viswatejan opened 1 year ago

viswatejan commented 1 year ago

Describe the bug When a multi-module maven project is opened in VS Code and the child module directory names are not the same as their artifactIDs, the Maven extension is recognizing that as a module and also loads the modules as a Java project but the sources are not listed under the Java project.

To Reproduce Steps to reproduce the behavior:

  1. Create a multi-module maven project.
  2. Name the child module directories child1, child2, etc.
  3. Name the child modules' artifactID as child-1, child-2, etc.
  4. Add some Java classes under the src/main/java/ directory under those child modules.
  5. Open the multi-module project in VSCode

Expected behavior

Environments (please complete the following information as much as possible):

Screenshots This is the file structure with bundle, providers, sso-redirect, themes are my child modules with the artifactIds lib_security_rhsso_bundle, lib_security_rhsso_providers, lib_security_rhsso_redirect, lib_security_rhsso_themes respectively.

image

Recognized the maven modules and loaded them as Java projects but did not load the appropriate source and test classes with the Java and Maven dependencies in the Java Project view.

image

Additional context If I use the same name for the directory name and the artifactId of the module, it is working fine.

testforstephen commented 1 year ago

Transfer to the right repo since this issue is related to Java Projects view.