Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.3.0
-
None
-
None
Description
On our project we have a list of inhouse authored dependencies that we do expect to have runtime scope, these are our optional modules. This list of optional modules is subset of the entire list of inhouse authored dependencies.
We can add these optional, runtime scope expected dependencies to ignoredUnusedDeclaredDependencies but that will remove these dependencies from all the analysis. This presents a problem because we would like an unnecessary compile scope dependencies to be flagged in chains of these optional modules.
Alternatively we can make use of ignoreUnusedRuntime but we only expect these optional modules to have runtime scope, where a non-optional module is declared with a runtime dependency this should also flagged by the plugin.
Ideally it would be possible to specify which modules we do expect to have runtime scope. Couple of implementation approaches spring to mind:
Approach 1
Extend the specification of ignoredUnusedDeclaredDependencies to include scope. So the syntax filter is extended from:
[groupId]:[artifactId]:[type]:[version]
to:
[groupId]:[artifactId]:[type]:[version]:[scope]
Approach 2
Introduce a new parameter ignoreUnusedRuntimeDependencies (analogous to ignoredNonTestScopedDependencies)