You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thorsten Glaser (Jira)" <ji...@apache.org> on 2021/12/13 18:12:00 UTC

[jira] [Commented] (MDEP-714) Add analyze parameter "ignoreUnusedRuntime"

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

Thorsten Glaser commented on MDEP-714:
--------------------------------------

I’m having the same problem, but with {{{}test{}}}-scoped dependencies.

{{<!-- must be on the classpath -->}}
{{<ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter-engine</ignoredUnusedDeclaredDependency>}}

… and…

{{<dependency>}}
{{        <groupId>org.junit.jupiter</groupId>}}
{{        <artifactId>junit-jupiter-engine</artifactId>}}
{{        <version>${junit.version}</version>}}
{{        <scope>test</scope>}}
{{</dependency>}}

I’m not sure generally ignoring them all is the way to go, though…

> Add analyze parameter "ignoreUnusedRuntime"
> -------------------------------------------
>
>                 Key: MDEP-714
>                 URL: https://issues.apache.org/jira/browse/MDEP-714
>             Project: Maven Dependency Plugin
>          Issue Type: New Feature
>          Components: analyze
>            Reporter: Elliotte Rusty Harold
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.2.0
>
>
> 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.20.1#820001)