In a multi-module maven project, is there a variable that points to the root project folder?
${project.basedir}
points to the current project's directory,${project.parent.basedir}
points to the parent project's directory, but is there a variable that always points to the root directory (the one from which the maven command was executed), no matter from which project inside the reactor?
I realized that the problem I wanted to solve is pretty much unsolvable. I wanted a variable that pointed to either project.basedir, project.parent.basedir, project.parent.parent.basedir etc, whichever is higher. But since a project's parent pom need not be it's parent in the file system, my whole approach won't help. So I am accepting Pascal's answer because it answers my question (even if my question does not solve my problem).
is there a variable that always points to the root directory (the one from which the maven command was executed)
user.dir
(the working directory) should be that directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With