Exclude transitive dependency for all dependencies

As far as I can tell, the only way to determine if a given dependency will bring in transitive dependencies is to resolve the configuration. Since we would want to exclude certain dependencies from the resolved configuration that would probably require making a copy of the original configuration and then resolving the copy in order to determine which dependencies require the exclusion. Seeing as how the only side-effect of the above approach is superfluous excludes in your pom I wouldn’t expect the benefit be worth the additional build overhead.