简体   繁体   中英

How can I make JetBrains Intellij IDEA 13 recognize a Git imported project as a Maven project?

I have been having trouble with IDEA ( JetBrains Intellij IDEA 13 ) not reading the pom.xml file after the project has been imported using the VCS . How can I make IDEA recognize this as a Maven project so it gets all the dependencies from the pom.xml ?

This is what the pom.xml currently looks like in Project View :

在此处输入图片说明

To test it try this our:

  1. Go to VCS->Chech out from Version Control->Git
  2. Enter this spring project: https://github.com/SpringSource/spring-mvc-showcase
  3. Select the desired clone path and press "Clone"

If everything is working correctly it will ask you to create an Intellij project

How can I fix this?

  1. Right click the pom.xml file.
  2. In the menu select " Add as Maven project ", the project will now turn into a Maven project and the pom.xml file icon should turn into an m , the Maven logo.

How did it occur?

This occurs when you don't include the " .idea " folder in the Git repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM