I have an IntelliJ project A composed of several Maven modules.
I have another IntelliJ project B also composed of several Maven modules.
I need to import few modules from project B into project A, since project A scans at runtime certain classes found in project B and does cool stuff with them.
What I have done so far was importing the whole project B into project A (From the main menu, selecting File -> importing project from existing sources).
I also modified the settings of the module in project A where I am testing: I added as dependencies all the modules in project B that were previously imported.
I also verified that the "Export" checkbox is selected near the modules added as dependencies.
However, when I execute my unit tests, they can see at runtime all the classes from the imported projects, but cannot resolve classes that are declared as maven dependencies at those projects.
So my question is how can import these modules so I can resolve at runtime both classes declared in those modules and classes in jars from dependencies in such modules?