I want to use the maven-dependency-plugin to copy artifacts from all sub-modules of my multi-module project to a directory that is relative to the root directory of the enti
There is a maven plugin that solves this particular problem: directory-maven-plugin
It will assign the root path of your project to a property of your choosing. See highest-basedir
goal in the docs.
For example:
org.commonjava.maven.plugins
directory-maven-plugin
0.1
directories
highest-basedir
initialize
main.basedir
Then use ${main.basedir}
anywhere in your parent / child pom.xml.