I have an IntelliJ IDEA project contains two Scala modules M1 and M2. Each of those modules contain a single Scala class C1 and C2 respectively. In addition, class C2 imports class C1.
All went well until I’ve added Maven module support for both modules.
The first step was adding Maven framework support for M1 (the “depend-on” module). I was able to compile the project after that.
The second step was adding framework support for M2 (the dependent module).
Immediately after I did that, C2 was unable to resolve C1 anymore even though the paths seems OK and M1 appeared in M2’s dependancies list.
Of course I’ve also added a framework support for the project itself.
Any idea what is going on there?
Just to clarify your project layout:
IntelliJ aside. Can you compile your project from the command line using Maven? i.e. run the following on the command line:
Did you add M1 as a dependency to your M2 modules pom.xml file? Like so