title: With maven, how can I get the absolute path to where my root pom is?
body: <p>I need to get the absolute path to a subdirectory located just below where my root pom is.
  For example the pom is at:
  <code>c:\somepath\pom.xml</code>
  I need to get the absolute path to:
  <code>c:\somepath\myIncludes\</code>
  I need this while building in a pom with a path like one these:
  <code>c:\somepath\subdir1\pom.xml</code>
  <code>c:\somepath\subdir1\evendeeperdir\pom.xml</code></p>
  
  <p>To try to stave off comments about how this is a dumb thing to need, I need this because:</p>
  
  <ul>
  <li>The C++ code that gets built by the pom needs a path to includes.</li>
  <li>There are multiple C++ projects with different relative paths ( so even though relative paths can work, it is too tedious and error prone to use multiple relative paths )</li>
  <li>The project is mostly java (so I want to build it all with maven)</li>
  <li>The whole thing is giant and legacy, so I cannot make sweeping changes in the structure.</li>
  </ul>