title: java.lang.NoClassDefFoundError in Maven shaded jar for salesforce API jars
body: <p>I have an Apache Maven Java project that imports the class:</p>
  
  <p>com.sforce.soap.enterprise.EnterpriseConnection </p>
  
  <p>When running the project from IntelliJ, I have no problems executing the code. However, I want to be able to run the project from the command line as a shaded jar. I have been shading the jar using 'mvn package'. When I run the jar from the command line I am getting the error: </p>
  
  <p>Exception in thread "main" java.lang.NoClassDefFoundError: com/sforce/soap/enterprise/EnterpriseConnection</p>
  
  <p>My pom includes dependencies:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;qa-integration.sfdc&lt;/groupId&gt;
    &lt;artifactId&gt;enterprise&lt;/artifactId&gt;
    &lt;version&gt;1.0.0&lt;/version&gt;
    &lt;scope&gt;system&lt;/scope&gt;
    &lt;systemPath&gt;${project.basedir}/libs/enterprise-1.0.0.jar&lt;/systemPath&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;qa-integration.sfdc&lt;/groupId&gt;
    &lt;artifactId&gt;metadata&lt;/artifactId&gt;
    &lt;version&gt;1.0.0&lt;/version&gt;
    &lt;scope&gt;system&lt;/scope&gt;
    &lt;systemPath&gt;${project.basedir}/libs/metadata-1.0.0.jar&lt;/systemPath&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>My shade execution looks like the following: </p>
  
  <pre><code>      &lt;execution&gt;
          &lt;phase&gt;package&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;shade&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
            &lt;filters&gt;
              &lt;filter&gt;
                &lt;artifact&gt;*:*&lt;/artifact&gt;
                &lt;excludes&gt;
                  &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                  &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                  &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                &lt;/excludes&gt;
              &lt;/filter&gt;
            &lt;/filters&gt;
            &lt;createDependencyReducedPom&gt;false&lt;/createDependencyReducedPom&gt;
            &lt;transformers&gt;
              &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                &lt;mainClass&gt;com.sunrun.integration.sfdc.metadata.Main&lt;/mainClass&gt;
              &lt;/transformer&gt;
            &lt;/transformers&gt;
          &lt;/configuration&gt;
        &lt;/execution&gt;
  </code></pre>
  
  <p>When I list the contents of the jar, I see no salesforce files at all. </p>