title: Conflicting library version in a Java Maven project
body: <p>When building a Maven project that has many dependencies, some of those dependencies depend on the same library but use a different version which is causing errors when running an application.</p>
  <p>For example, if I add two different project dependencies, A and B that both depend on Apache Commons HTTP client but each one on a different version, once the class-loader loads A's Apache commons http client classes, B will try to use them since they are already loaded by the class loader.</p>
  <p>But B's bytecode depends on a different version of the loaded classes causing multiple problems when running the application. A common one is method-not-found exception (since A's version of http client doesn't use a specific method any more).</p>
  <p>What is the general strategy when building to avoid such conflicts? Does one have to manually check the dependency tree to figure out which common libraries collide with each other?</p>