title: Build jar file with test classes
body: <p>I have multiple classes in <code>main</code> and a class in <code>test</code> package. I use following code in pom.xml and execute <code>maven install</code> to create file.</p>
  
  <pre><code>  &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.1.0&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;goals&gt;
            &lt;goal&gt;test-jar&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>I checked jar file and found, that it contains files from /src/main/ folder, but doesn't contain classes /src/test/ folder, where test class with main method is located.</p>