Say we have the following dependency hierarchy in maven:
+- projectA
| +- projectB
| | +- projectC
| | +- projectD
Here projectB needs certain libraries from projectA (let's say libX). But, those libraries are not needed any further in the hierarchy (ie. C and D don't need libX). Now, as projectC and projectE are inheriting all the dependencies from their parent project (projectA), so they can provide for such dependency.
Q. Can we restrict the dependency inheritance at the level of projectB itself, so that we need not exclude it manually everywhere (viz. projectC, projectD, etc.)