question
The pom.xml file cannot be recognized by idea
detailed question
The author imports a project that has been developed on another person's computer. After importing, the pom.xml file cannot be recognized by idea, and at the same time, other dependencies cannot be imported by refreshing maven.
solution
1 Right button pom.xml
→ \rightarrow→ clickAdd as Maven Project
2 to update maven changes (or useCtrl + Shfit + O
)
reason
The reason for this problem may be that the project developed on other people's computers is opened using eclipse, and imported from eclipse to idea, the pom.xml file cannot be directly recognized by maven. Right-click the pom.xml file and select "add as maven project", then the project can be set as a maven-based project, and the required dependencies can be obtained by updating the maven changes.