You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Francis (Jira)" <ji...@apache.org> on 2022/05/16 12:50:00 UTC
[jira] [Created] (MDEP-807) Exclude listed runtime scoped dependencies from dependency analysis
Francis created MDEP-807:
----------------------------
Summary: Exclude listed runtime scoped dependencies from dependency analysis
Key: MDEP-807
URL: https://issues.apache.org/jira/browse/MDEP-807
Project: Maven Dependency Plugin
Issue Type: New Feature
Components: analyze
Affects Versions: 3.3.0
Reporter: Francis
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:
h3. 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]}}
h3. Approach 2
Introduce a new parameter {{ignoreUnusedRuntimeDependencies}} (analogous to {{ignoredNonTestScopedDependencies}})
--
This message was sent by Atlassian Jira
(v8.20.7#820007)