title: ANT : What is the simplest way to add version number to built jar?
body: <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project name="myPlugin" default="all"&gt;
  &lt;target name="artifact.myPlugin:jar" depends="init.artifacts, compile.module.myPlugin" description="Build &amp;#39;myPlugin:jar&amp;#39; artifact"&gt;
      &lt;mkdir dir="${artifact.output.myplugin:jar}" /&gt;
      &lt;jar destfile="${temp.jar.path.myPlugin.jar}" duplicate="preserve" filesetmanifest="mergewithoutmain"&gt;
          &lt;zipfileset file="${basedir}/META-INF/MANIFEST.MF" prefix="META-INF" /&gt;
          &lt;zipfileset dir="${myPlugin.output.dir}" /&gt;
      &lt;/jar&gt;
  
  &lt;!--How would I add a version number to this that reflects my projects version --&gt;
      &lt;copy file="${temp.jar.path.myPlugin.jar}" tofile="${artifact.output.myPlugin:jar}/plugin.company.jar" /&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>What is the typcial way that people do this?</p>
  
  <p>Example (Pulled from above)</p>
  
  <pre><code>&lt;copy file="${temp.jar.path.myPlugin.jar}" tofile="${artifact.output.myPlugin:jar}/plugin.company{version}.jar" /&gt;
  </code></pre>