title: Minimize an Uber Jar correctly, Using Shade-Plugin
body: <p>I am using the Maven-Shade-Plugin to create a runnable Uber-jar.
  According to the last frame on <a href="http://maven.apache.org/plugins/maven-shade-plugin/examples/includes-excludes.html" rel="noreferrer">this page</a>, the size of the jar can be minimized by using:</p>
  
  <pre><code>&lt;configuration&gt;
        &lt;minimizeJar&gt;true&lt;/minimizeJar&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But this feature does not take into consideration the classes that are declared in the log4j.properties file. Hence, e.g. <code>org.apache.log4j.appender.TimeAndSizeRollingAppender</code> is not included in the Uber-jar, even though it’s declared in the log4j.properties file.</p>
  
  <p>I believe I will face the same problem with Spring. If my code only refers to interface A and my Spring file contains an instantiation of class B that implements A, then B might not be added to the jar, since it’s not in the code.</p>
  
  <p>How can I solve this problem?</p>