title: Maven shade plugin failed to execute goal?
body: <p>There error message in question is </p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project myapp-core: Error creating shaded jar: null: IllegalArgumentException -&gt; [Help 1]
  </code></pre>
  
  <p>from <code>mvn package</code> in the <code>myapp-core</code> folder. <code>mvn clean</code> and <code>mvn compile</code> work fine. My project structure is</p>
  
  <pre><code>myapp/
      myapp-acceptance-tests/
      myapp-core/
          pom.xml
      pom.xml
  </code></pre>
  
  <p>And <code>myapp/pom.xml</code> is defined by</p>
  
  <pre><code>&lt;groupId&gt;com.myself.myapp&lt;/groupId&gt;
  &lt;artifactId&gt;myapp&lt;/artifactId&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;modules&gt;
      &lt;module&gt;myapp-core&lt;/module&gt;
      &lt;module&gt;myapp-acceptance-tests&lt;/module&gt;
  &lt;/modules&gt;
  
  &lt;properties&gt;
      &lt;maven.compiler.source&gt;10&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;10&lt;/maven.compiler.target&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      ...
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>And <code>myapp/myapp-core/pom.xml</code> is defined by</p>
  
  <pre><code>&lt;artifactId&gt;myapp-core&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &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;archive&gt;
                      &lt;manifest&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                          &lt;mainClass&gt;myself.myapp.Main&lt;/mainClass&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;10&lt;/source&gt;
                  &lt;target&gt;10&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;server&gt;mytomcat7&lt;/server&gt;
                  &lt;path&gt;/&lt;/path&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
              &lt;executions&gt;
                  &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;shadedArtifactAttached&gt;true&lt;/shadedArtifactAttached&gt;
                          &lt;shadedClassifierName&gt;shaded&lt;/shadedClassifierName&gt;
                          &lt;minimizeJar&gt;true&lt;/minimizeJar&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <ul>
  <li>It is a much later version than the <em>upgrade the version</em> fix found <a href="https://stackoverflow.com/questions/49436651/error-creating-shaded-jar-null-illegalargumentexception">in this question</a></li>
  <li>the plugin is in the submodule pom rather than the parent pom  as is
  the mistake
  <a href="https://stackoverflow.com/questions/3147512/using-maven-shade-plugin-in-a-multi-module-project-nullpointerexception">here</a></li>
  <li>and I have tried removing <code>&lt;packaging&gt;jar&lt;/packaging&gt;</code> to no avail. </li>
  </ul>
  
  <p>What does maven-shade-plugin need to successfully create the shaded jar?</p>
  
  <p><strong>EDIT: setting minimizeJar to false solves my problem, but why? Is there a better way, or a way to get the benefits of a minimised jar?</strong></p>