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

3.6.0 reporting Used undeclared dependency that is only used indirectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 3.6.0
    • None
    • analyze
    • None

    Description

      reproducer project: https://github.com/josephlbarnett/mdep-3.6.0-analyze-reproducer

      if you change the maven-dependency-plugin version to 3.5.0 in the above project, the maven build will pass.

       

      It appears that referencing an interface that extends another interface (and calling a method in that interface) is pulling that extended interface in as a used dependency?  In this case the `software.amazon.awssdk.services.kms.KmsClientBuilder` interface extends an interface from the aws-core jar (`software.amazon.awssdk.awscore.client.builder.AwsClientBuilder`), and the example code calls the `.region()` method.   In 3.5.0 the aws-core dependency was not treated as used, but in 3.6.0 it is.  Unclear if this is only interface extension or classes implementing interfaces would have a similar problem?

       

      Is this intended behavior?

      Attachments

        Activity

          People

            elharo Elliotte Rusty Harold
            jbarnett Joe Barnett
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: