title: maven-deploy-plugin Ignores Version Number?
body: <p>I am new to Maven, and I am try to deploy my project as a war, and as a jar.  I would love to split the project to do the same, but it is too large for simple me to do in a reasonable time.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/754216/maven-deploy-additional-jar-file">maven deploy additional jar file</a>, which suggested I add some plugins.</p>
  
  <p>The install plugin works great</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;phase&gt;install&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;install-file&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;packaging&gt;jar&lt;/packaging&gt;
                  &lt;artifactId&gt;${project.artifactId}&lt;/artifactId&gt;
                  &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
                  &lt;version&gt;SNAPSHOT&lt;/version&gt;
                  &lt;file&gt;
                      ${project.build.directory}/${project.artifactId}-SNAPSHOT.jar
                  &lt;/file&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>[INFO] [install:install-file {execution: default}]
  [INFO] Installing C:\Server\example\code\server\my-project\target\my-project-SNAPSHOT.jar to C:\Users\Kyle\.m2\repository\com\example\main-project\my-project\SNAPSHOT\my-project-SNAPSHOT.jar
  </code></pre>
  
  <p>The problem is with the maven-deploy-plugin.  It seems to ignore the SNAPSHOT version I am forcing it to use:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;phase&gt;deploy&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;deploy-file&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;packaging&gt;jar&lt;/packaging&gt;
                  &lt;generatePom&gt;true&lt;/generatePom&gt;
                  &lt;url&gt;${project.distributionManagement.snapshotRepository.url}&lt;/url&gt;
                  &lt;artifactId&gt;${project.artifactId}&lt;/artifactId&gt;
                  &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
                  &lt;version&gt;SNAPSHOT&lt;/version&gt;
                  &lt;!--${project.version}!="SNAPSHOT" for some reason--&gt;
                  &lt;file&gt;${project.build.directory}/${project.artifactId}-SNAPSHOT.jar&lt;/file&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Seems to use some other version number (YYYYMMDD.HHmmSS-#)</p>
  
  <pre><code>[INFO] [deploy:deploy-file {execution: default}]
  [INFO] Retrieving previous build number from remote-repository
  Uploading: http://build.example.biz:8081/artifactory/libs-snapshots-local/com/example/main-project/my-project/SNAPSHOT/my-project-20120625.161551-2.jar
  42993K uploaded  (my-project-20120625.161551-2.jar)
  </code></pre>
  
  <p>What am I doing wrong?</p>