question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-module Maven project does not work

See original GitHub issue

I created a multi-module Maven project and tried to open the root folder in Visual Studio Code. When I try to work with any of the sub-modules, I do not get any linting, formatting, refactoring, etc… I tried Add Folder to Java Source Path but that does not work either. I have no issues working with this project in other IDE’s, including Eclipse.

Environment
  • Operating System: Windows 10
  • JDK version: 1.8.0.201
  • Visual Studio Code version: 1.14.1
  • Java extension version: 0.55.1
Steps To Reproduce
  1. Clone example project:
git clone https://github.com/hashdelta/stix-pattern-evaluator-examples.git
cd stix-pattern-evaluator-examples
git checkout develop
  1. Open project in VSCode
Current Result

The plugin does not recognize the children modules, thus does not provide any kind of Java semantics support - no linting, formatting, refactoring, etc…

Expected Result

You should be able to get semantics support for any Java class when you open the parent. It should be one cohesive project.

Additional Informations

The only way to work with the sub modules is by opening the module in its own VSCode instance. This does not work for me, as one of my projects consists of over 20+ modules.

I have verified in Eclipse, NetBeans, and IntelliJ that the GitHub project has no issues.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:9
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
go-fish-wxycommented, Dec 13, 2021

It looks like clearing the workspaceStorage fixed my issue. Does this deserve a close?

@hashdelta yes, you can close the issue.

Hi, I am just facing same issue, kindof no idea how to make vs code recognize the project folder and all sub folders and files as a multi-module maven project, e.g. pom file in sub module report error “could not find dependency” What steps shall I take to make project workable in vs code until I can debug the source file

0reactions
brunoborgescommented, Aug 31, 2021

Facing issue too with the microsoft/gctoolkit project (multi-module, and each has its own module-info.java).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why a module in my multi-module maven project doesn't work?
Right-click the parent/root project and choose Configure > Configure and Detect Nested Projects...
Read more >
Multi-Module Project with Maven - Baeldung
In this tutorial, we'll learn how to build a multi-module project with Maven. First, we'll discuss what a multi-module project is, ...
Read more >
Guide to Working with Multiple Modules - Apache Maven
This section outlines how Maven processes projects with multiple modules, and how you can work with them more effectively. The Reactor. The mechanism...
Read more >
Unable to correctly import multi module maven project
Unable to correctly import multi module maven project. OS: Mac OS Version: JetBrains IntelliJ CE 2020.3. Problem Description: I'm trying to work on...
Read more >
Create Multi-Module Maven Project in Eclipse - YouTube
... to share with you guys how to create a multi - module project Java Maven project in Eclipse IDE, ... Your browser...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found