Say you have a project (web app) which uses 2 third-party libraries - A and B.
Say A depends on version 1.10 of another third-party library C.
Say B depends on version 1.15 of the same third-party library C.
Which version of C should you put in the lib folder of your web app project?!
Assume you don't know C well, you're not sure if C 1.15 is compatible with 1.10, or anything like that.
Is there a way to put A.jar and B.jar, and both C jars in the lib folder of your project, but at runtime (under Tomcat or JBoss e.g.) have A load C 1.10 jar, but have B load C 1.15 jar.
I don't think this is possible as they share the same web app class loader (and so it will load the C classes either from 1.10 or from 1.15 pretty much unpredictably; whichever of the two JARs happens to be first on the classpath) ... but I'm not sure.
If it's indeed not possible, what's the best practice for handling this kind of conflicts?