Issues
Users have expressed the desire to turn off transitive dependencies and/or filter out some dependencies obtained transitively. This design attempts to allow the latter.
"Undecided"
This design was not agreed on as:
- we are uncertain whether it is a problem we want get into solving instead of requiring the correction of metadata.
- the affect of declaring scope=none in dependency management inside the pom of a transitive dependency would mean that it would need to be repeated at each level that wanted to exclude it
- could cause confusion if a user has used it poorly
Filtering out unwanted transitive dependencies
This should be done at the POM level, since it doesn't make sense to exclude a dependency in one place and allow it from another transitive dep at the same time. This should be done using the dependency management element and a modified scope.
<dependency> <!-- Never use jdbc --> <groupId>jdbc</groupId> <artifactId>jdbc</artifactId> <scope>none</scope> </dependency>
The none
scope means that the dependency is not resolved, and excluded from all class paths.
At this point, there will not be a way to disable the transitive dependencies of a particular dependency, as there is no supporting use case other than poor metadata which can we worked through using exclusions.