title: How do I build only one JAR file with classifier?
body: <p>I'm using <code>Maven 2</code> and <code>maven-jar-plugin</code> to build my <code>jar</code>.</p>
  
  <p>I'd like to generate only a <code>jar</code> with a <code>classifier</code>. Is it possible?</p>
  
  <p>In my example I'd like to generate only the <code>myjar-another-1.0.jar</code> but not <code>myjar-1.0.jar</code>.</p>
  
  <p>After take a look at this <a href="https://stackoverflow.com/questions/2188746/what-is-the-best-way-to-avoid-maven-jar">question</a> I tried to skip the <code>default-jar</code>. But this seems to work only with version 3 of Maven (haven't tried thou.</p>
  
  <p>The parent is to do the </p>
  
  <pre><code>&lt;modules&gt;
  </code></pre>
  
  <p>Thanks all!</p>
  
  <p>Here is the relevant piece of my pom.xml:</p>
  
  <p>Also tried in the global configuration segment.</p>
  
  <pre><code>&lt;project&gt;
           &lt;!-- Definition of the Parent (only an aggregator) --&gt;     
      &lt;build&gt;
        &lt;plugins&gt;
           &lt;!-- &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt; --&gt;
           &lt;!-- surefire --&gt;
           &lt;!-- &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt; --&gt;
           &lt;plugin&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;classifier&gt;another&lt;/classifier&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;test-jar&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;test-jar&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
       &lt;/plugins&gt;
     &lt;/build&gt;
  </code></pre>