I just downloaded Intellij on a laptop and I imported a Maven project and the problem is that Intellij do not found any dependency in pom.xml. For example if I try to import hibernate-core or any other dependency I get the error: Dependency org.hibernate-core... not found. What should I do? Any feedback will be appreciated.
5 Answers
In case of Intellij Idea, make right click on pom.xml, select maven and then click to reimport. Find below the screenshot.
3 Comments
Reload project, which solved the problem for me. Why we have to do this by default is beyond me -- extremely, extremely frustrating.I solved this issue by running "mvn idea:idea" command. It resolved all module dependencies and also add it to classpath in intellij.
5 Comments
pom.xml, Maven --> Reload. Did the trick. Thanks @nayakasu!It may also be worth checking which Maven your IDE is using. You can check it in settings:
We used to have issues with Maven bundled with IntelliJ.
2 Comments
Bundled (maven 3) option then it updated the librariesYou could also go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Repositories and check that the local maven repository is set.
Same for File -> Settings -> Build, Execution, Deployment -> Remote Jar Repositories where the remote maven repository should be set (something like https://repo1.maven.org/maven2)


mvn installcommand. It will download all the dependencies.Maven. Just open it and clickrefresh. Should reload project and you should see difference.