title: How to strip the basedir from an absolute path to get a relative path?
body: <p>In the build.xml of my project I have a property defined:</p>
  
  <pre><code>&lt;property name="somedir.dir" location="my_project/some_dir"/&gt;
  </code></pre>
  
  <p>The value of <code>${somedir.dir}</code> will be an absolute path: <code>/home/myuser/my_project/some_dir</code>.</p>
  
  <p>What I need is just the relative path <code>./my_project/some_dir</code> without the <code>${basedir}</code> value <code>/home/myuser</code>. How can I achieve this using Ant?</p>
  
  <p>So far I found a solution by converting the property to a path and then use "pathconvert", but I don't think this is a nice solution:</p>
  
  <pre><code>&lt;path id="temp.path"&gt;
      &lt;pathelement location="${somedir.dir}" /&gt;
  &lt;/path&gt;
  &lt;pathconvert property="relative.dir" refid="temp.path"&gt;
      &lt;globmapper from="${basedir}/*" to="./*" /&gt;
  &lt;/pathconvert&gt;
  </code></pre>
  
  <p>Any other (more elegant) suggestions?</p>