title: Include libraries in EAR with Maven
body: <p>I'd like to use maven to include jar/war's libraries in my EAR project's lib folder.</p>
  
  <p>Currently my ear looks like this :</p>
  
  <pre><code>lib
  lib/&lt;entities&gt;.jar
  lib/&lt;ejb-client&gt;.jar
  &lt;ejb-impl&gt;.jar
  &lt;web-app-project&gt;.war
  </code></pre>
  
  <p>Each jar/war have maven dependencies which are declared with scope provided.</p>
  
  <p>Why scope provided? I'm using Glassfish 3.1.2 and having issue when I put libraries in <code>/WEB-INF/lib</code>. I fixed the issue by copying libs in ear/lib instead (see <a href="https://stackoverflow.com/questions/16479553/spring-glassfish-3-1-2-stale-files">Spring / Glassfish 3.1.2 stale files</a>).</p>
  
  <p>What I want to do is to tell to maven he has to put thoses librairies in the ear's lib folder.</p>
  
  <p>I tried to put all projects in the ear's maven dependencies but it's not working actually.</p>
  
  <p>Could someone help me ?</p>
  
  <p>Thanks,</p>
  
  <p>Smoky</p>