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.
In case of Intellij Idea, make right click on pom.xml, select maven and then click to reimport. Find below the screenshot.
Reload project
, which solved the problem for me. Why we have to do this by default is beyond me -- extremely, extremely frustrating. –
Bowne I solved this issue by running "mvn idea:idea" command. It resolved all module dependencies and also add it to classpath in intellij.
pom.xml
, Maven --> Reload. Did the trick. Thanks @nayakasu! –
Finch 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.
Bundled (maven 3)
option then it updated the libraries –
Brandi You 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)
After "Maven" > "Reload project" an additional "Build" > "Rebuild project" (in IDEA window menu) was necessary to eliminate all "dependency ... not found" error messages in my case.
© 2022 - 2024 — McMap. All rights reserved.
mvn install
command. It will download all the dependencies. – KrouseMaven
. Just open it and clickrefresh
. Should reload project and you should see difference. – Borzoi