jetbrains 打开maven项目, 出现如下提示
这个时候打开 Terminal在提示符下输入:mvn idea:module
回车运行,就可以修复。
Relationship between .iml file and pom.xml file
The intelliJ idea doesn't understand the maven project model (POM.xml) itself. When creating or importing maven project in idea. It also creates its own project structure, maven dependencies, module details, etc, etc.. basically required project metadata in the format it can understand and use it internally for it actions. These metadata stored in .iml
file and .idea
project directory.
Main advantage of keeping it's own structure would provide capacity to run faster and manage project efficiently.