Overriding transitive dependency version in library's pom doesn't override version in pom using the library

34 views Asked by At

Sorry for the confusing title but it would be easier if I drew a dependency chart

lib-a (v1a)
  \_lib-b
     \_lib-c (v1c)

lib-d
  \_ lib-a (v1a)

I have a use case like this, and I'm trying to override the version of lib-c to v2c in lib-a jar and lib-d jar

So in pom.xml for lib-a, I have excluded lib-c and added lib-c as dependency with version v2c

But when the lib-a is being used in lib-d it still shows the version of lib-c to be v1c, is that how it supposed to be? Shouldn't the override in lib-a's pom override the version of lib-c in lib-a's users? Is the only way out is override lib-c again in lib-d's pom?

0

There are 0 answers