I’m trying to find a “generic” way of excluding a transitive dependency from being included without having to exclude it from all the dependencies that depend on it. For ex
To expand on dnault's comment:
One can use the Maven Enforcer plugin's Banned Dependencies rule to ensure dependencies are excluded. One still has to exclude them manually, but the build will fail if anyone adds the dependency elsewhere by mistake.
org.hibernate
hibernate-jmx
3.3.2.GA
org.slf4j
slf4j-api
org.apache.maven.plugins
maven-enforcer-plugin
1.4.1
enforce
org.slf4j:slf4j-api
Also there is an open feature request: MNG-1977 Global dependency exclusions