Force Intellij IDEA to reread all maven dependenci

2019-01-03 01:33发布

How to force intellij idea to reread/update all dependencies specified in the pom file ?

9条回答
叛逆
2楼-- · 2019-01-03 01:44

If you are using version ranges for any dependencies, make sure that IntelliJ is using Maven 3 to import the project. You can find this setting in: Settings > Maven > Importing > Use Maven3 to import project. Otherwise you may find that SNAPSHOT versions are not imported correctly.

查看更多
冷血范
3楼-- · 2019-01-03 01:49

The leftmost button (blue cycle) below also reimports all maven projects:

enter image description here

查看更多
地球回转人心会变
4楼-- · 2019-01-03 01:51

Press Ctrl+Shift+A to find actions, and input "reimport", you will find the "Reimport All Maven Projects".

On a Mac, use ++A instead.

查看更多
萌系小妹纸
5楼-- · 2019-01-03 01:54

If the reimport does not work (i.e. doesn't remove old versions of dependencies after a pom update), there is one more chance:

  • open the project settings (CTRL+SHIFT+ALT+S)
  • on modules, delete all libs that you want to reimport (e.g. duplicates)
  • IDEA will warn that some are still used, confirm
  • Apply and select OK
  • then reimport all maven projects.
查看更多
虎瘦雄心在
6楼-- · 2019-01-03 01:56

For IntelliJ IDEA 14.0

Project > [your project name] > right click > Maven > Reimport

查看更多
Lonely孤独者°
7楼-- · 2019-01-03 01:58

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?

查看更多
登录 后发表回答