In Intellij IDEA 2017.2, I am trying to import an existing multi-module Maven project which builds fine outside the IDE via Maven. When the import is complete, I noticed that in one of the Maven submodules, a symbol is unresolved, lets call this submodule submodule-problem. The unresolved symbol is a class that is defined in another submodule, lets call that submodule-other. The thing is that in submodule-problem, other classes defined in other submodules at the level of submodule-other are found ok(those submodules are defined as dependencies in the pom file of submodule-problem). Furthermore, submodule-other isn't declared as a dependency in submodule-problem's pom file. But I should NOT have to do this because as I mentioned mvn clean install -Dmaven.test.skip=true works fine. So does mvn test-compile. I am using the latest Maven 3.5.0 and have instructed IDEA to use the same for the said imported project in the project's Maven settings. Note: I don't have permission to show the code or concerned POM files.
Things I've tried to resolve the issue so far are:
- Invalidate caches and restart IDEA, many times
- Re-import as Maven project, many times
- Delete the .idea folder and all *.iml files from the said project and re-import as Maven project, a few times
- Delete IDEA's system preferences folder and retry all previous steps again many times (this step was painful as I had to install all my plugins and configure IDE setting over again)
- Imported the same project into Eclipse-Oxygen and saw that it doesn't have any issues with the importing of the project.