title: How to include package.jar with maven-assembly-plugin
body: <p>I used maven and maven-jar-plugin and maven-assembly-plugin to build a zip of my project including the projects jar and its dependencies.</p>
  
  <p>This is the plugin configuration:</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;2.5&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;mainClass&gt;MyMainClass&lt;/mainClass&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                          &lt;classpathPrefix&gt;lib/&lt;/classpathPrefix&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-assembly-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;descriptors&gt;
                      &lt;descriptor&gt;src/main/assembly/assembly.xml&lt;/descriptor&gt;
                  &lt;/descriptors&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;single&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>And this is the assembly.xml:</p>
  
  <pre><code>&lt;assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"&gt;
      &lt;id&gt;bin&lt;/id&gt;
      &lt;formats&gt;
          &lt;format&gt;zip&lt;/format&gt;
      &lt;/formats&gt;
      &lt;includeBaseDirectory&gt;false&lt;/includeBaseDirectory&gt;
      &lt;fileSets&gt;
          &lt;fileSet&gt;
              &lt;includes&gt;${project.build.finalName}&lt;/includes&gt;
              &lt;outputDirectory&gt;/&lt;/outputDirectory&gt;
          &lt;/fileSet&gt;
      &lt;/fileSets&gt;
      &lt;dependencySets&gt;
          &lt;dependencySet&gt;
              &lt;outputDirectory&gt;/lib/&lt;/outputDirectory&gt;
              &lt;useProjectArtifact&gt;true&lt;/useProjectArtifact&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependencySet&gt;
      &lt;/dependencySets&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>I try to include the jar created by the maven-jar-plugin using <code>&lt;fileSet&gt;&lt;includes&gt;${project.build.finalName}&lt;/includes&gt;...</code>. But this throws an error:</p>
  
  <pre><code>Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (default) on project tbdb-core: Error reading assemblies: Error reading descriptor: src/main/assembly/assembly.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...&lt;fileSet&gt;\r\n\t\t\t&lt;includes&gt;${project.build.finalName}&lt;/... @10:42) -&gt; [Help 1]
  </code></pre>
  
  <p>Omitting the <code>fileset</code> entry, I get an zip only with the dependencies.</p>
  
  <p>How can I include just the jar created by the maven-jar-plugin? TIA!</p>