I have a multimodule project and unfortunately tests from one module are depend from tests in another module like below:
Module A
public class TestA {...}
public class SomeClassA {...}
Module B
public class TestB extends TestA {
  private SomeClassA instanceOfA;
     .....
}
There is dependency in module's B pom.xml:
    <dependency>
        <groupId>id</groupId>
        <artifactId>module_A</artifactId>
        <type>jar</type>
        <scope>provided</scope>
    </dependency>
and if I open project settings (ctrl + alt + shift + s) there is module A in module B dependencies tab (it has scope compile if that matters). So it looks like I have valid dependencies, but when I'm trying to run my tests there are multiple errors occur and as I understand the main is the following:
The hierarchy of the type TestB is inconsistent.
Other 2 errors are relate to constructor and it is likely that they are consequences of the hierarchy messup.
The same tests are perfectly runs from eclipse if I do export module A in module B and run my test with classpath pointed to module B with checked «add exported…» and «add required…».
Is it possible to import one module with all libraries into another in IDEA?