title: How to exclude log4j.properties file when building fat jar with Maven assembly plugin
body: <p>I am bundling a FAT jar from 'my.jar' and its dependencies. 'My.Jar' contains log4j.properties file and 'my.jar' dependencies include Log4j.jar which also has log4j.properties file bundeled in log4j.jar file by default. now when assembly plugin combines all jars it put the default log4j.properties file but exempt the log4j.properties file from my jar file.</p>
  
  <p>How can i instruct assembly plugin to exclude log4j.properties file from default Log4j.jar file and use put it from my jar into final Fat jar? or it must override the default file from provided file.</p>
  
  <p>Here is my assembly descriptor </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;assembly    
      xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"    
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    
      xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"&gt;
    &lt;id&gt;jar-with-dependencies&lt;/id&gt;
    &lt;formats&gt;
      &lt;format&gt;jar&lt;/format&gt;
    &lt;/formats&gt;
    &lt;includeBaseDirectory&gt;false&lt;/includeBaseDirectory&gt;
    &lt;dependencySets&gt;
      &lt;dependencySet&gt;
        &lt;outputDirectory&gt;/&lt;/outputDirectory&gt;
        &lt;unpack&gt;true&lt;/unpack&gt;
        &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;useProjectArtifact&gt;false&lt;/useProjectArtifact&gt;
        &lt;useProjectAttachments&gt;true&lt;/useProjectAttachments&gt;
      &lt;/dependencySet&gt;
      &lt;dependencySet&gt;
        &lt;scope&gt;system&lt;/scope&gt;
        &lt;unpack&gt;true&lt;/unpack&gt;
        &lt;includes&gt;
          &lt;include&gt;sample:com.sample&lt;/include&gt;
        &lt;/includes&gt;
      &lt;/dependencySet&gt;
    &lt;/dependencySets&gt;
  &lt;/assembly&gt;
  </code></pre>