title: Maven: Different library versions in one JVM
body: <p>I have a project whose dependency tree is huge i.e. it packs in modules from several teams.</p>
  
  <p>Now there are some commonly used dependencies which are common across several modules.</p>
  
  <p>A simplified example can be:</p>
  
  <pre><code>TopModule.jar
    ChildModule.jar
      CommonModule-v1.jar
    CommonModule-v2.jar
  </code></pre>
  
  <p>When I build my project, I specify the latest version of common dependencies, but its very hard to ask the same from every other team.</p>
  
  <p>So, frequently, the TopModule is built using different versions of CommonModule (v1 and v2 in the above example).</p>
  
  <p>My question is:</p>
  
  <p>If the final jar file contains both CommonModule-v1.jar and CommonModule-v2.jar, how does it affect the runtime?</p>
  
  <p>Can the runtime erroneously load versions v2 where v1 is required and vice versa?</p>