Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-840

Unused declared dependencies found but dependency is used?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.0
    • None
    • analyze-only
    • None

    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:

      [ERROR] Unused declared dependencies found:
      [ERROR]    io.dropwizard:dropwizard-auth:jar:2.1.4:compile

       

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jbarnett Joe Barnett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: