IntelliJ IDEA: How to synchronize project libraries with dependencies in pom.xml?

前端 未结 2 821
时光取名叫无心
时光取名叫无心 2021-01-18 17:13

When I change a dependency version in one of the pom.xml of my project (which has several modules) I see the new version and also the old one in the Libraries section of the

2条回答
  •  梦毁少年i
    2021-01-18 17:55

    Well, this is not problem with synchronize project libraries.

    The synchronization settings can be set via Settings > Maven > Importing > Import maven project automatically

    But I think this is other problem. It is caused by other dependency which uses different Drools version. You have to exclude the old Drools version from that dependency explicitly.

    How to find this problem causing dependency?

    Open your dependency tree. It can be done via right click on your maven module and click Show dependencies or hit Ctrl + Alt + Shift + U.

    There will be some red lines leading to different version of the same maven artifact. Just click on it and Idea will lead you where the inconsistency happened. Then just right click on maven artifact with wrong version and click Exlude or Shift + delete.

    Check your pom.xml. You should find line like this:

    
       
          drools
          drools
          5.4
        
    
    

提交回复
热议问题