Press Ctrl+Shift+A to find actions, and input "reload", you will find the "Reload All Maven Projects".
On a Mac, use ⌘+⇧+A instead.
Answer from Jacky on Stack OverflowPress Ctrl+Shift+A to find actions, and input "reload", you will find the "Reload All Maven Projects".
On a Mac, use ⌘+⇧+A instead.
Open the "Maven Projects" tab/window and clicking the "Reimport All Maven Projects" in the upper left corner starts to reload all dependencies from their repositories. The status bar informs about the process.
What lets you think that this is not working correctly? Maybe any of the dependencies can't be load from the repository?
java - Import Maven dependencies in IntelliJ IDEA - Stack Overflow
How can I make IntelliJ IDEA update my dependencies from Maven? - Stack Overflow
Intellij is not download maven dependency from online, what is the solution
java - How to force IntelliJ to download javadocs with Maven? - Stack Overflow
Videos
IntelliJ should download and add all your dependencies to the project's classpath automatically as long as your POM is compliant and all the dependencies are available.
When importing Maven projects into IntelliJ an information box usually comes up asking you if you want to configure Auto-Import for Maven projects. That means that if you make any changes to your POM those changes will be loaded automatically.
You can enable such feature going to File > Settings > Maven > Importing, there is a checkbox that says "Import Maven projects automatically".
If that doesn't help, then I would suggest to make a full clean-up and start again:
- Close your project window (and IntelliJ) and remove all
*.imlfiles and all.ideafolders (there should be one per module) - Run
mvn clean installfrom the command line - Re-import the project into IntelliJ and pay attention when it asks you to enable auto-import
IntelliJ 2016 Update:
The Import Maven Projects automatically setting has been moved to Build, Execution, Deployment > Build Tools > Maven > Importing in your IntelliJ preferences.
Fix before IntelliJ 14
File [menu] -> Settings -> maven -> importing and uncheck "use maven3 to import project"
ref: http://youtrack.jetbrains.com/issue/IDEA-98425 (which may have a few other ideas too)
Fix IntelliJ 15+
Ran into this again, with IntelliJ 15 this time, which has no "use maven3 to import" option available anymore. The cause was that sometimes IntelliJ "doesn't parse maven dependencies right" and if it can't parse one of them right, it gives up on all of them, apparently. You can tell if this is the case by opening the maven projects tool window (View menu -> Tool Windows -> Maven Projects). Then expand one of your maven projects and its dependencies. If the dependencies are all underlined in red, "Houston, we have a problem".

You can actually see the real failure by mousing over the project name itself.

In my instance it said "Problems: No versions available for XXX" or "Failed to read descriptor for artifact org.xy.z" ref: https://youtrack.jetbrains.com/issue/IDEA-128846 and https://youtrack.jetbrains.com/issue/IDEA-152555
It seems in this case I was dealing with a jar that didn't have an associated pom file (in our maven nexus repo, and also my local repository). If this is also your problem, "urrent work around: if you do not actually need to use classes from that jar in your own code (for instance a transitive maven dependency only), you can actually get away with commenting it out from the pom (temporarily), maven project reload, and then uncomment it. Somehow after that point IntelliJ "remembers" its old working dependencies. Adding a maven transitive exclude temporarily might also do it, if you're running into it from transitive chain of dependencies."
Another thing that might help is to use a "newer version" of maven than the bundled 3.0.5. In order to set it up to use this as the default, close all your intellij windows, then open preferences -> build, execution and deployment -> build tools -> maven, and change the maven home directory, it should say "For default project" at the top when you adjust this, though you can adjust it for a particular project as well, as long as you "re import" after adjusting it.
Clear Caches
Deleting your intellij cache folders (windows: HOMEPATH/.{IntellijIdea,IdeaC}XXX linux ~/.IdeaIC15) and/or uninstalling and reinstalling IntelliJ itself. This can also be done by going to File [menu] -> Invalidate Caches / Restart.... Click invalidate and restart. This will reindex your whole project and solve many hard-to-trace issues with IntelliJ.
It turns out IntelliJ does not pick up added dependencies from the local Maven repository. We have to tell IntelliJ to reimport the pom.xml.
- Open the project view in IntelliJ
- Right click the pom.xml file and select Maven > Reimport or Maven > Reload (for newer versions of IntelliJ)
- If this works for you IntelliJ will add the dependencies to the project
- Check the if the dependencies you need are added in
- File - Project Structure - Project Settings - Libraries
- and File - Project Structure - Modules - Dependencies
You don't have to reimport manually each time. You can enable auto-import as documented here. Change this in Settings -> Maven -> Import Maven projects automatically.
Click on the "maven projects" (make sure tool buttons are on) on the right side of IntelliJ and then click on "Download Documentation".
Also, for future downloading, you can go to File -> Settings -> Build,execution, deployment, -> build tools -> Maven -> importing -> mark "Documentation" checkbox and apply settings.
Maven Projects panel
Maven Projects tool window > Icon with green arrow and a box > Download Documentation:

See IntelliJ IDEA documentation for Version 14.1 or current version.
In the 'Maven Projects' tab on the side of the Idea window is a toolbar button (looks like a box with a green arrow pointing down) for downloading sources and documentation.
In IntelliJ 2018.2.3 Ultimate Edition, click on "Maven Projects" on the right hand side of the window (vertical text alignment). Then click the third button on the left in the toolbar (arrow pointing down to a horizontal line- not green for me).