title: How to exclude a file only for selected dependencies
body: <p>Is there a way to achieve the following in Maven? I want to exclude a file (see <code>META-INF/services/org/apache/camel/TypeConverter</code> below) from the final jar file built by Maven. </p>
  
  <pre><code>drools-camel-5.3.0.Final.jar
  +-- META-INF
    +-- services 
      +-- org
        +-- apache
          +-- camel 
            +-- component
              +-- TypeConverter
  </code></pre>
  
  <p>I can use something like the following:</p>
  
  <pre><code>&lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;excludes&gt;
            &lt;exclude&gt;**/TypeConverter&lt;/exclude&gt;
          &lt;/excludes&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>However, in doing so the <code>TypeConverter</code> file will be excluded from all the jars (including the two examples I've shown below). I don't want that. <code>TypeConverter</code> should only be excluded from selected jars (in this case <code>drools-camel-5.3.0.Final.jar</code> only). </p>
  
  <p>Is this possible in Maven ? If yes, how ?  I currently have only one pom.xml file with all my dependencies and plugins. </p>
  
  <pre><code>camel-http-2.10-SNAPSHOT.jar
  +-- META-INF
    +-- services 
      +-- org
        +-- apache
          +-- camel 
            +-- component
              +-- TypeConverter
  
  camel-twitter-2.10-SNAPSHOT.jar
  +-- META-INF
    +-- services 
      +-- org
        +-- apache
          +-- camel 
            +-- component
              +-- TypeConverter
  </code></pre>