title: Build maven jar from classes no java source
body: <p>I want to build a maven jar artifact from classes. I don't have source files. These classes are originally in another artifact installed locally. I use maven-dependency-plugin to unpack the classes and put them in the target folder for this project/module. </p>
  
  <p>It creates the jar.. but doesn't include the classes I just unpacked. Here's my pom: </p>
  
  <pre><code>&lt;build&gt;
  ... 
  
  &lt;!-- unpack myjar1.jar and myjar2.jar --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.8&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;unpack&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;unpack&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;artifactItems&gt;
                                  &lt;artifactItem&gt;
                                      &lt;groupId&gt;com.company&lt;/groupId&gt;
                                      &lt;artifactId&gt;myjar1&lt;/artifactId&gt;
                                      &lt;version&gt;1.0&lt;/version&gt;
                                      &lt;type&gt;jar&lt;/type&gt;
                                      &lt;overWrite&gt;false&lt;/overWrite&gt;
                                      &lt;outputDirectory&gt;target/final&lt;/outputDirectory&gt;
                                  &lt;/artifactItem&gt;
                                  &lt;artifactItem&gt;
                                      &lt;groupId&gt;com.company&lt;/groupId&gt;
                                      &lt;artifactId&gt;myjar2&lt;/artifactId&gt;
                                      &lt;version&gt;1.0&lt;/version&gt;
                                      &lt;type&gt;jar&lt;/type&gt;
                                      &lt;overWrite&gt;false&lt;/overWrite&gt;
                                      &lt;outputDirectory&gt;target/final&lt;/outputDirectory&gt;
                                  &lt;/artifactItem&gt;
                              &lt;/artifactItems&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
  &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;2.4&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;default&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;classesDirectory&gt;/path/to/target/final/folder&lt;/classesDirectory&gt;
                              &lt;includes&gt;
                                  &lt;include&gt;**&lt;/include&gt;
                              &lt;/includes&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
  &lt;/plugins&gt;
  
  &lt;/build&gt;
  </code></pre>
  
  <p>How can I include these classes into my final.jar? </p>