Given three project modules X, Y and Z on a Maven based project, and Y depends of Z and X of Y and X should not know that Y depends of Z, being this:
X -> Y
Y -> Z
X -X> Z
What is the best way to hide the dependency between modules X and Z ?
I'm aware that on Maven it's possible to change the scope of the dependency, but I would like to know if there are any other options for it