You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lars Knickrehm (Jira)" <ji...@apache.org> on 2021/01/02 14:55:00 UTC

[jira] [Commented] (MDEP-714) runtime dependencies reported as unused

    [ https://issues.apache.org/jira/browse/MDEP-714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17257395#comment-17257395 ] 

Lars Knickrehm commented on MDEP-714:
-------------------------------------

Recently I came over the same problem and created a Pull Request at [https://github.com/apache/maven-dependency-plugin/pull/123]. That change introduces a new boolean property, called {{ignoreUnusedRuntime}}, and simply suppresses runtime scoped unused dependencies if set to {{true}}.

I'm not familiar with Apache project contribution. Therefore just take the Pull Request the way you like or tell me what to do. Feel free to discuss this solution together and with me.

I'd just be glad to see this or a similar functionality in a future Maven Dependency Plugin version.
Thanks.

> runtime dependencies reported as unused
> ---------------------------------------
>
>                 Key: MDEP-714
>                 URL: https://issues.apache.org/jira/browse/MDEP-714
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>            Reporter: Elliotte Rusty Harold
>            Priority: Major
>
> Typical output when analyzing the maven-archetype-plugin:
> [WARNING] Unused declared dependencies found:
> [WARNING]    org.apache.ivy:ivy:jar:2.5.0:runtime
> However since this is needed at runtime, possibly via reflection, it seems likely that it is used but the dependency analyzer can't figure this out.
> Confirm and consider whether the plugin should simply never report runtime dependencies as unused. 
> This is tricky because it's certainly possible that a runtime dependency is unused, but in practice it seems more likely than not to be a false positive.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)