You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Joe Barnett (Jira)" <ji...@apache.org> on 2022/12/02 00:37:00 UTC

[jira] [Updated] (MDEP-840) Unused declared dependencies found but dependency is used?

     [ https://issues.apache.org/jira/browse/MDEP-840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Barnett updated MDEP-840:
-----------------------------
    Description: 
We have a class here: [https://github.com/trib3/leakycauldron/blob/main/testing/src/main/kotlin/com/trib3/testing/server/ResourceTestBase.kt]

 

that imports io.dropwizard.auth.AuthValueFactoryProvider from io.dropwizard:dropwizard-auth, and the pom declares that dependency directly.

 

Starting with maven-dependency-plugin 3.4.0, we now get this error when running the analyze-only goal:
{code:java}
[ERROR] Unused declared dependencies found:
[ERROR]    io.dropwizard:dropwizard-auth:jar:2.1.4:compile{code}
 

removing the declared dependency results in the code failing to compile since dropwizard-auth is no longer on the classpath.  This worked in 3.3.0.

  was:
We have a class here: [https://github.com/trib3/leakycauldron/blob/main/testing/src/main/kotlin/com/trib3/testing/server/ResourceTestBase.kt]

 

that imports io.dropwizard.auth.AuthValueFactoryProvider from io.dropwizard:dropwizard-auth, and the pom imports that dependency directly.

 

Starting with maven-dependency-plugin 3.4.0, we now get this error when running the analyze-only goal:
{code:java}
[ERROR] Unused declared dependencies found:
[ERROR]    io.dropwizard:dropwizard-auth:jar:2.1.4:compile{code}
 

removing the declared dependency results in the code failing to compile since dropwizard-auth is no longer on the classpath.  This worked in 3.3.0.


> Unused declared dependencies found but dependency is used? 
> -----------------------------------------------------------
>
>                 Key: MDEP-840
>                 URL: https://issues.apache.org/jira/browse/MDEP-840
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: analyze-only
>    Affects Versions: 3.4.0
>            Reporter: Joe Barnett
>            Priority: Major
>
> We have a class here: [https://github.com/trib3/leakycauldron/blob/main/testing/src/main/kotlin/com/trib3/testing/server/ResourceTestBase.kt]
>  
> that imports io.dropwizard.auth.AuthValueFactoryProvider from io.dropwizard:dropwizard-auth, and the pom declares that dependency directly.
>  
> Starting with maven-dependency-plugin 3.4.0, we now get this error when running the analyze-only goal:
> {code:java}
> [ERROR] Unused declared dependencies found:
> [ERROR]    io.dropwizard:dropwizard-auth:jar:2.1.4:compile{code}
>  
> removing the declared dependency results in the code failing to compile since dropwizard-auth is no longer on the classpath.  This worked in 3.3.0.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)