title: Maven assembly -- how to create the project JAR with version included, but the artifact tar.gz file without?
body: <p>Using Maven I want to create 1) a JAR file for my current project with the current version included in the file name, myproject-version.jar, and 2) an overall artifact in tar.gzip format containing the project's JAR file and all dependency JARs in a lib directory and various driver scripts in a bin directory, but without the version number or an arbitrary ID in the name.  I have this working somewhat using the assembly plugin, in that if I use the below pom.xml and assembly.xml then when I run 'mvn package' I can get a tar.gzip file with the JARs and scripts included as desired, however I don't seem to be able to get the naming/versioning correct -- either I get both the project's JAR file and the tar.gzip file with the version number or not depending on the build/finalName used.  How can I specify these separately, and is it impossible to build the final artifact without an ID appended to the artifact name?  For example I'd like to have my project's JAR file be named myproject-0.0.1-SNAPSHOT.jar and the overall "uber" artifact be named myproject.tar.gz (no version number or additional ID appended to the name).  Is this possible?</p>
  
  <p>My current pom.xml and asssembly.xml are included below.</p>
  
  <p>pom.xml:</p>
  
  <pre><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/maven-v4_0_0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;mygroup&lt;/groupId&gt;
      &lt;artifactId&gt;myproject&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;myproject&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
              &lt;version&gt;2.3&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;${project.artifactId}-${project.version}&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;descriptors&gt;
                          &lt;descriptor&gt;src/main/maven/assembly.xml&lt;/descriptor&gt;
                      &lt;/descriptors&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-assembly&lt;/id&gt; &lt;!-- this is used for inheritance merges --&gt;
                          &lt;phase&gt;package&lt;/phase&gt; &lt;!-- bind to the packaging phase --&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;    
  &lt;/project&gt;
  </code></pre>
  
  <p>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;tar.gz&lt;/format&gt;
      &lt;/formats&gt;
      &lt;fileSets&gt;
          &lt;!-- the following file set includes the Python scripts/modules used to drive the monthly processing runs --&gt;
          &lt;fileSet&gt;
              &lt;directory&gt;src/main/python&lt;/directory&gt;
              &lt;outputDirectory&gt;bin&lt;/outputDirectory&gt;
              &lt;includes&gt;
                  &lt;include&gt;indices_processor.py&lt;/include&gt;
                  &lt;include&gt;concat_timeslices.py&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/fileSet&gt;
          &lt;!-- the following file set includes the JAR artifact built by the package goal --&gt;
          &lt;fileSet&gt;
              &lt;directory&gt;target&lt;/directory&gt;
              &lt;outputDirectory&gt;lib&lt;/outputDirectory&gt;
              &lt;includes&gt;
                  &lt;include&gt;*.jar&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/fileSet&gt;
      &lt;/fileSets&gt;
      &lt;dependencySets&gt;
          &lt;!-- the following dependency set includes the dependency JARs needed by the main Java executable for indicator processing --&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;unpack&gt;false&lt;/unpack&gt;
          &lt;/dependencySet&gt;
      &lt;/dependencySets&gt;
  &lt;/assembly&gt; 
  </code></pre>
  
  <p>Thanks in advance for any suggestions.</p>