In gradlem, can avoid jar hell a little by doing something like this

We have a downstream library webpieces ( a webserver, httpclient, etc) that brings in jackson(if using the jackson plugin), brings in hibernate(if using hibernate plugin) etc. etc.

We have a mono-repo and microservice architecture and our whole mono-repo depends on the same webpieces version. In some cases, we don’t want to depend on webpieces at all though in libraries as it doesn’t make sense BUT to prevent jar hell, we would love to depend on webpieces version 1.2.96’s hibernate or jackson, etc. We don’t care which version of jackson or hibernate it is. Our libraries really should not depend on webpieces nor do we want them to. We just want them depending on transitive dependencies of webpieces since we use that in all our servers.

In this way, we can upgrade webpieces by just swapping the version of webpieces and seeing compiler errors for webpieces AND hibernate AND jackson etc. as they all seamless upgrade to whatever webpieces is using.

Is there a way to do this? ( I am doubting it but I ran into a jar hell issue today in h2 db version 1.4.192 and 1.4.200 as the latter deleted a class yet it compiled fine in gradle then had issues when running and of course per usual jar hell, it was confusing).

thanks,
Dean