I need to get the absolute path to a subdirectory located just below where my root pom is.
For example the pom is at:
c:\somepath\pom.xml
I need to get the absolute path to:
c:\somepath\myIncludes\
I need this while building in a pom with a path like one these:
c:\somepath\subdir1\pom.xml
c:\somepath\subdir1\evendeeperdir\pom.xml
To try to stave off comments about how this is a dumb thing to need, I need this because:
- The C++ code that gets built by the pom needs a path to includes.
- 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 )
- The project is mostly java (so I want to build it all with maven)
- The whole thing is giant and legacy, so I cannot make sweeping changes in the structure.