title: Maven JAR Plugin 3.0.2 Error: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them
body: <p>Maven JAR plugin (version 3.0.2) keeps throwing the following error, <strong>even for a single invocation of the <code>jar</code> goal</strong>: </p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar (default) on project test: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them. -> [Help 1]</p>
  </blockquote>
  
  <p>Here's a (minimal?) <code>pom.xml</code> which demonstrates the problem: </p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;test&lt;/groupId&gt;
    &lt;artifactId&gt;test&lt;/artifactId&gt;
    &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.0.2&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;jar&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The invocation is just <code>mvn package</code>. </p>
  
  <ul>
  <li>It doesn't seem to matter whether there are any classes/resources at all — the above error message appears anyway. </li>
  <li>The problem also appears if two goals are specified (<code>jar</code> and <code>test-jar</code>). </li>
  <li>The problem does NOT appear if <strong>no goals</strong> are specified. But this is not an option, since I really need both <code>jar</code> and <code>test-jar</code>. </li>
  </ul>
  
  <p>According to the <a href="https://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html#classifier" rel="noreferrer">documentation</a>, <code>classifier</code> only needs to be specified on multiple invocations of the same goal, and there's a reasonable default for the <code>test-jar</code> goal which I don't intend to change. </p>
  
  <p>Also, <strong>the problem doesn't seem to appear on the 2.x line of the JAR plugin.</strong></p>
  
  <p>Did I miss something? 
  Could anybody please suggest what I am doing wrong? </p>
  
  <p>P.S. The Maven version is 3.3.9. </p>