I have the following problem with a multi module maven project:
The project was initially created in Eclipse and can be compiled and run there. It also can be built with mvn install
.
Now when I import the project into Intellij using the following import options the parent pom.xml is recognized and the project and its modules are imported.
Everything looks fine, but when I try to compile it, one class, that has a class from another module as a dependency, cannot be found.
I tried a lot of solutions and the ONLY one that worked for me is the outdated maven idea plugin mvn idea:idea
as suggested in this
thread. Now every time something in any of the projects poms changes, I have to rerun mvn idea:idea
and hope that it works - otherwise I have to import the whole project again.
What am I doing wrong in the import process? Why does mvn install
on the command line work, but building the project in Intellij does not?