title: exclude entries in MANIFEST.MF
body: <p>I am currently building and EAR file using maven-ear-plugin</p>
  
  <p>I have a requirement to exclude some of the Class-Path: entries from MANIFEST.MF file.</p>
  
  <p>For example I have 3 dependencies hibernate-core.jar, quartz-1.6.5.jar and poi-3.7.jar in my class path (in my dependency of pom.xml)</p>
  
  <p>When I build my EAR file all these entries will be automatically added to Class-Path entry of my MANIFEST.MF file.</p>
  
  <p>My maven build looks as follows</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;build&gt;
      &lt;finalName&gt;MyEAR&lt;/finalName&gt;
      &lt;plugins&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-ear-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
              &lt;archive&gt;
                  &lt;addMavenDescriptor&gt;false&lt;/addMavenDescriptor&gt;
                  &lt;manifest&gt;
                      &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                      &lt;addExtensions /&gt;
                      &lt;classpathPrefix /&gt;
          &lt;/manifest&gt;
                  &lt;manifestFile&gt;src/main/resources/META-INF/MANIFEST.MF               &lt;/manifestFile&gt;
              &lt;/archive&gt;
              .....
              .....
          &lt;/configuration&gt;
      &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>In the above build file</p>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;addClasspath&gt;true&lt;/addClasspath&gt;
  </code></pre>
  
  <p>is responsible for adding the MANIFEST.MF entries. </p>
  
  <p>My requirement is to add only 2 jars in dependency quartz-1.6.5.jar and poi-3.7.jar and exlcude the remaning.</p>
  
  <p>If I give false all the entries are excluded from the MANIFEST.MF classpath.
  If the remove the depependecy entries from pom I get compilation errors.</p>
  
  <p>how can I achieve the above scenario.</p>
  
  <p>thanks,</p>