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
Thank you very much, Milan.
The problem in my case seems to be an IntelliJ bug (or feature!) but your answer has been really helpful so I will mark it as accepted. It seems that IntelliJ doesn't update dependency versions for grandchildren.
I'll explain what happens.
I have a parent POM (P) and two children POMs (C1 and C2).
The parent P defines some properties including:
5.4.0.Final
Child C1 depends on that Drools version using:
org.drools
drools-core
${drools.version}
C2 depends on C1 so it depends on that Drools version indirectly.
If I change the version in the parent POM to 5.5.0.Final and import changes (of that POM) then the Libraries section of the Project Structure window includes both versions: 5.4.0.Final and 5.5.0.Final.
The reason is C2 still thinks it depends on the old version. The dependency tree for C1 shows the right version 5.5.0.Final of Drools. However, the dependency tree of C2 shows a dependency on C1 (right) which in turn depends on the old 5.4.0.Final version (wrong).
To fix that, I reimport C1's POM (or all POM's I guess). Then the 5.4.0.Final is gone from the Libraries and the dependency tree of C2 reflects the right Drools version.