Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Shortcut to force maven reimport

Does IntelliJ IDEA have a short-cut to force maven project reimport (to reload dependencies). I happen to be working with two dependant projects and I make that action many times during the day.

Thanks in advance.

like image 298
Trax Avatar asked Jan 30 '13 06:01

Trax


People also ask

How do I force reimport Maven in IntelliJ?

Press Ctrl + Shift + A to find actions, and input "reload", you will find the "Reload All Maven Projects". On a Mac, use ⌘ + ⇧ + A instead.

What is Maven reimport?

Reimport will load your local jars instead of remote jars, especially SNAPSHOT ones. You can enable force update snapshot in maven menu, which will enable -U switch in intellij.


3 Answers

You can define your own key map in IDE Settings. To do it :

  • Menu File > Settings
  • Under IDE Settings, choose Keymap
  • Expand the tree to Plug-ins > Maven integration
  • You normally see "Reimport All Maven Projects"
  • Right-click on this item and choose a Key or Mouse shortcut.

(I did this with IDEA EAP 12, under windows)

like image 154
ben75 Avatar answered Oct 16 '22 12:10

ben75


I looked throught keymap reference(Help->Dafault Keymap Reference) and didn't find anything with maven. But when I make some changes in my pom.xml IDEA shows dialog in which it offer to import all dependencies.

other maven settings you can find in File->Settings->Maven->Import or use combination Shift+CTRL+A and in input field write maven.

like image 42
Aleksei Bulgak Avatar answered Oct 16 '22 12:10

Aleksei Bulgak


With newer versions of Intellij and macos, hit shift-shift and then type "reload maven" to get to the "Reload All Maven Projects" action. This will refresh the dependencies - no need to reimport.

like image 41
Thomas Avatar answered Oct 16 '22 11:10

Thomas