Is there a syntactic way in a pom file to exclude a dependency of a transitive dependency.
For example, if A has a dependency B and B has a dependency C and C has a dependency on D, a way to exclude dependency D when compiling A.
Exclusions for a dependency only seem to go one level deep.
How I have accomplished this in the past is to include dependency C in A's pom and then add the exclusion for D in C's dependency declaration. Is this the recommended way?