title: Maven - Sharing libraries between projects
body: <p>I'm working on a multi-project, and right now I have a structure that resembles this (actually there are a couple of jar projects and a couple of war projects)</p>
  
  <pre><code>/myProj
   |_______projA (jar)
   |          |____pom.xml
   |          |____target/jar files
   |_______projB (war)
   |          |___pom.xml
   |          |___web-inf/lib/jarfiles
   |_______projEar 
   |          |___pom.xml
   |___pom.xml
  </code></pre>
  
  <p>What I want to achieve, is to make <code>projA</code> and <code>projB</code> to read their dependences from a common shared folder, instead of keeping their own copy.</p>
  
  <p>Actually, I don't really care where they read them from at compile time, but when I package my EAR file, I want each <code>jar</code>/<code>war</code> to appear just once, hence reducing the EAR size.</p>
  
  <p>I've tried declaring the dependencies on the parent pom, declaring the dependencies as  and some other things, but so far I haven't achieved this.</p>
  
  <p>Is there an easy way to achieve this? Any simple maven plugin?</p>
  
  <p>Thanks in advance.</p>