title: How to configure maven:assembly root path in the jar
body: <p>Here is the pom.xml</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;org.springframework.webflow&lt;/groupId&gt;
      &lt;artifactId&gt;spring-js-resources-thin&lt;/artifactId&gt;
      &lt;version&gt;2.2.1.RELEASE&lt;/version&gt;
      &lt;name&gt;Spring js lib&lt;/name&gt;
      &lt;description&gt;Spring javascript library without dojo&lt;/description&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.2.1&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;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>and here is the <code>assembly.xml</code></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;assembly&gt;
      &lt;id&gt;js-jar&lt;/id&gt;
      &lt;formats&gt;
          &lt;format&gt;jar&lt;/format&gt;
      &lt;/formats&gt;
      &lt;fileSets&gt;
          &lt;fileSet&gt;
              &lt;directory&gt;src/main/resources/&lt;/directory&gt;  
              &lt;outputDirectory&gt;/&lt;/outputDirectory&gt;
              &lt;includes&gt;
                  &lt;include&gt;META-INF/**/*&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/fileSet&gt;
      &lt;/fileSets&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>The problem is, everytime I open the generated jar file(spring-js-resources-thin-2.2.1.RELEASE-js-jar.jar), the root folder is always named as <code>artifactid-version</code>(spring-js-resources-thin-2.2.1.RELEASE), then the META-INF.</p>
  
  <p>I wonder there is anyway that I can build the jar file with the file name <code>artifactid-version.jar</code>, but WITHOUT the <code>artifactid-version</code> in the class path, just like every jar in the maven repository. I think there should be an option or a way to name the <code>&lt;outputDirectory&gt;</code>.</p>