title: Jenkins maven deploy jar to nexus - artifact naming
body: <p>My java/maven project called "testproject" is hooked up with my jenkins and nexus repo:</p>
  
  <p>My pom.xml looks like:</p>
  
  <pre><code>....    
  &lt;distributionManagement&gt;
      &lt;!-- use the following if you're not using a snapshot version. --&gt;
      &lt;repository&gt;
          &lt;id&gt;nexus&lt;/id&gt;
          &lt;name&gt;RepositoryProxy&lt;/name&gt;
          &lt;url&gt;http://nexus:8080/nexus/content/repositories/releases&lt;/url&gt;
      &lt;/repository&gt;
      &lt;!-- use the following if you ARE using a snapshot version. --&gt;
      &lt;snapshotRepository&gt;
          &lt;id&gt;nexus&lt;/id&gt;
          &lt;name&gt;RepositoryProxy&lt;/name&gt;
          &lt;url&gt;http://nexus:8080/nexus/content/repositories/snapshots&lt;/url&gt;
      &lt;/snapshotRepository&gt;
  &lt;/distributionManagement&gt;
  ......
  </code></pre>
  
  <p>In my jenkins set up, I have:</p>
  
  <pre><code>Build - maven3 - clean deploy
  </code></pre>
  
  <p>As expected, jenkins uploads the artifact to Nexus.Look at the console output from jenkins build, as below:</p>
  
  <pre><code>[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ testproject ---
  [INFO] Building jar: /var/lib/jenkins/workspace/testproject/target/testproject-0.1-SNAPSHOT.jar
  [INFO] 
  [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ testproject ---
  [INFO] Installing /var/lib/jenkins/workspace/testproject/target/testproject-0.1-SNAPSHOT.jar to /var/lib/jenkins/.m2/repository/com/dummy/testproject/0.1-SNAPSHOT/testproject-0.1-   SNAPSHOT.jar
  [INFO] Installing /var/lib/jenkins/workspace/testproject/pom.xml to /var/lib/jenkins/.m2/repository/com/dummy/testproject/0.1-SNAPSHOT/testproject-0.1-SNAPSHOT.pom
  [INFO] 
  [INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ testproject ---
  Downloading: http://nexus:8080/nexus/content/repositories/snapshots/com/dummy/testproject/0.1-SNAPSHOT/maven-metadata.xml
  Downloaded: http://nexus:8080/nexus/content/repositories/snapshots/com/dummy/testproject/0.1-SNAPSHOT/maven-metadata.xml (1012 B at 28.2 KB/sec)
  Uploading: http://nexus:8080/nexus/content/repositories/snapshots/com/dummy/testproject/0.1-SNAPSHOT/testproject-0.1-20120509.161644-74.jar
  Uploaded: http://nexus:8080/nexus/content/repositories/snapshots/com/dummy/testproject/0.1-SNAPSHOT/testproject-0.1-20120509.161644-74.jar (47 KB at 748.5 KB/sec)
  Uploading: http://nexus:8080/nexus/content/repositories/snapshots/com/dummy/testproject/0.1-SNAPSHOT/testproject-0.1-20120509.161644-74.pom
  Uploaded: http://nexus:8080/nexus/content/repositories/snapshots/com/dummy/testproject/0.1-SNAPSHOT/testproject-0.1-20120509.161644-74.pom (6 KB at 149.3 KB/sec)
  </code></pre>
  
  <p><strong>Questions are</strong>:</p>
  
  <p>Given the version I specified in pom.xml is </p>
  
  <pre><code>&lt;version&gt;0.1-SNAPSHOT&lt;/version&gt;
  </code></pre>
  
  <ol>
  <li><p>How come jenkins upload testproject-<strong>0.1-20120509.161644-74</strong>.jar to Nexus? where is 20120509.161644-74 stuff coming from?</p></li>
  <li><p>if the timestamp <strong>20120509.161644-74</strong> is generated by jenkins prior to uploading, can I configure the format of it? I want to have something like testproject-01-${timestamp}-${reversionId}.jar</p></li>
  </ol>