1.

Why are exclusions made on a dependency-by-dependency basis instead of at the POM level?

Answer»

This is primarily to ensure that the dependency GRAPH is predictable, as well as to prevent inheritance effects from ELIMINATING a dependent that should not be EXCLUDED. If you have to use the method of last resort and add an exclusion, make sure you know which of your dependencies is causing the undesirable transitive dependency.

The banned dependencies rule can be specified to fail the BUILD if a troublesome dependency is identified, regardless of path. You'll need to add SPECIFIC exclusions to each path the enforcer detects if the build fails.



Discussion

No Comment Found