Intellij idea cannot resolve anything in maven

后端 未结 28 2191
一个人的身影
一个人的身影 2020-11-29 16:15

I\'m new to Intellij Idea, i just import a project with pom.xml, but the ide didn\'t resolve anything in maven dependencies.

Anything defined in p

28条回答
  •  天命终不由人
    2020-11-29 16:38

    In IntelliJ 12.1.4 I went through Settings --> Maven --> Importing and made sure the following was selected:

    1. Import Maven projects automatically
    2. Create IDEA modules for aggregator projects
    3. Keep source...
    4. Exclude build dir...
    5. Use Maven output...
    6. Generated souces folders: "detect automatically"
    7. Phase to be...: "process-resources"
    8. Automatically download: "sources" & "documentation"
    9. Use Maven3 to import project
      • VM options for importer: -Xmx512m

    This took me from having a lot of unresolved import statements to having everything resolved. I think the key here was using Maven3 to import project... Hopefully this helps.

提交回复
热议问题