title: How to Include specific jars in WAR, WEB-INF/lib directory with maven
body: <p>This is my pom.xml, trying to create a WAR file with specific 3 libraries in WEB-INF/lib directory.</p>
  
  <p>I include them in <code>&lt;packagingIncludes&gt;</code> tag and the they are packaged in lib dir,  but all <code>.class</code> files are ignored.</p>
  
  <p>I cannot use <code>&lt;packagingExcludes&gt;</code> because the dependent project has many 3rd party jars and out of my control. </p>
  
  <p>what is wrong here or is there a way i can ignore all jars except 3 specific jars?</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;1.0&lt;/modelVersion&gt;
  &lt;parent&gt;
      &lt;groupId&gt;frmId&lt;/groupId&gt;
      &lt;artifactId&gt;frm&lt;/artifactId&gt;
      &lt;version&gt;1.5.9&lt;/version&gt;
  &lt;/parent&gt;
  &lt;artifactId&gt;frmw&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;build&gt;
      &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&gt;
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/main/resources&lt;/directory&gt;
              &lt;excludes&gt;
                  &lt;exclude&gt;**/*.java&lt;/exclude&gt;
              &lt;/excludes&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
      &lt;plugins&gt;
      &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;warSourceDirectory&gt;src/main/webapp&lt;/warSourceDirectory&gt;
                  &lt;packagingIncludes&gt;WEB-INF/lib/frm-fl*.jar,WEB-INF/lib/frm-bean*.jar,WEB-INF/lib/frm-facade-${ffm.fpi.version}.jar&lt;/packagingIncludes&gt;
                  &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.fortify.ps.maven.plugin&lt;/groupId&gt;
              &lt;artifactId&gt;sca-maven-plugin&lt;/artifactId&gt;
               &lt;version&gt;${maven-sca-plugin.version}&lt;/version&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fi.ps&lt;/groupId&gt;
          &lt;artifactId&gt;frmc-fl&lt;/artifactId&gt;
          &lt;version&gt;${project.version}&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>