Chris Fillmore
08/14/2026, 8:19 PMMyApp depends on depA, which depends on an old version of depB :
MyApp -> depA -> depB
I want to break the dependency on depA and instead depend directly on a new version of depB . However I need to keep the previous arrangement, to support a gradual rollout of the change:
MyApp
-> depB
-> depA -> depB
From talking to Claude I am under the impression this is basically impossible, since there will be conflicts on the classpath.
Yet this seems like it may be a common requirement for projects, so I'm wondering how other people handle this. Thanks for your time.Adam
08/14/2026, 9:43 PMPhilip W
08/14/2026, 9:44 PMVampire
08/15/2026, 10:22 AMChris Fillmore
08/17/2026, 1:24 PMdepB is an open source project I want to build myself. I don't want to change anything about the vendor's transitive dependency.
So what I have is this:
MyApp -> vendorDependency -> vendorBuildOfOpenSourceProject
I am trying to break vendorDependency and rely on the (upstream) open source project, so that the end result looks like
MyApp -> myBuildOfOpenSourceProject
The artifacts vendorBuildOfOpenSourceProject and myBuildOfOpenSourceProject will occupy the same package namespace (com.example.etc). I don't know if the vendor build is a fork or a just a very old build.
However, I need a gradual rollout, so I need to support the vendor fork and the upstream build at the same time:
MyApp
-> vendorDependency -> vendorBuildOfOpenSourceProject
-> myBuildOfOpenSourceProject
When I have tried this previously, I encountered conflicts on the classpath iirc. I'm wondering how I can manage this situation.Chris Fillmore
08/17/2026, 1:25 PMVampire
08/17/2026, 2:04 PMvendorDependency can work with those classes.Chris Fillmore
08/17/2026, 2:40 PMYou build it under different coordinates, so have the same packages in different coordinates?Yes, unfortunately I am not able to control the vendor build. The open source package in question is a combination of Java and JNI bridge into C++, and the native layer calls back into Java packages using some hardcoded names. We investigated trying to build to another package target but I find that too risky. Just so I understand correctly, when you say coordinates you are talking about module version identifier correct? (group, name, version) From what you describe, it sounds like I could resolve the coordinates at build time, but not runtime?
Vampire
08/17/2026, 3:45 PMwhen you say coordinates you are talking about module version identifier correct? (group, name, version)Yes
it sounds like I could resolve the coordinates at build time, but not runtime?Coordinates are always resolved at build time, so I might not get what you mean
Chris Fillmore
08/17/2026, 3:47 PMCoordinates are always resolved at build timeEr, yes. I think that's what I mean, there is no way for me to "resolve the dependency at runtime"
Vampire
08/17/2026, 3:50 PMChris Fillmore
08/17/2026, 3:54 PMVampire
08/17/2026, 9:12 PMVampire
08/17/2026, 9:13 PMChris Fillmore
08/17/2026, 9:29 PMJohn
08/18/2026, 3:21 PMChris Fillmore
08/18/2026, 3:22 PMJohn
08/18/2026, 3:22 PMVampire
08/18/2026, 3:22 PMJohn
08/18/2026, 3:23 PMChris Fillmore
08/18/2026, 3:23 PM