title: How to exclude the lib folder in maven?
body: <p>How can I exclude the <code>lib</code> folder using maven? I don't want these resources to be copied when packaging and building war file.</p>
  
  <p>The following does not work:</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
          &lt;configuration&gt;
            &lt;packagingExcludes&gt;${basedir}/src/main/webapp/WEB-INF/lib/**&lt;/packagingExcludes&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>Example path:</p>
  
  <pre><code>../lib/my/path/to/lib.jar
  </code></pre>
  
  <p>Running <code>mvn package</code> will include all files from the lib folder.</p>