Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
The current BannedDependencies plugin allows the restriction of any artifact by groupId, artifactId, etc. We've observed cases where we need to block only in certain scopes, for instance:
- I have a component which uses some logging backend
- I don't want to allow any code to directly use the logging backend; it should use an abstraction SPI
- I want to bar all logging backends from the compilation classpath, but they must be available at runtime for tests
- So I'd set a banned dependency upon the logging backend for scopes "compile" and "provided", permitting its use in testing
I've mocked this (with hardcoded banned scopes) by copying from the existing BannedDependency stuff:
...which works pretty well, but it'd be nice to have this
1) Configurable
2) Upstream
Attachments
Issue Links
- duplicates
-
MENFORCER-72 Add scope to bannedDependencies rule
- Closed