title: How can I backup file using pom.xml?
body: <p>I've got three questions here. First, does pom.xml of maven have any difference from other xml file?</p>
  
  <p>Second, if I would like to rename a file in the same directory as the pom.xml by scripts, can I do it in pom.xml? If possible, then how should I do it?</p>
  
  <p>Last, how can I get the current time in pom.xml?</p>
  
  <p>In fact, what I want to achieve is that I would like to backup the current package(.war) by appending it with the timestamps before I mvn package it. I want the whole process automated by the pom.xml instead of manually processing it. </p>
  
  <p>Hi there,</p>
  
  <p>I find a way to get the timestamp, will it work?</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
    &lt;artifactID&gt;buildnumber-maven-plugin&lt;/artifactId&gt;
    &lt;execution&gt;
    &lt;phrase&gt;package&lt;/phrase&gt;
    &lt;configuration&gt;
      &lt;format&gt;{0, date, yyyy-MM-dd HH:mm:ss}&lt;/format&gt;
      &lt;items&gt;timestamp&lt;/items&gt;  
    &lt;/configuration&gt;
    &lt;execution&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>will it work? if it works, how can I obtain the timestamp variable? $items or $timestamp?</p>
  
  <p>Thanks</p>