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

Unused dependency not detected when present in test classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 2.10
    • None
    • analyze
    • None

    Description

      Hi,

      I realised that analyze-only was returning unexpected resuls.

      Basically, I have one simple maven project as defined here: https://gist.github.com/victornoel/713a3b17999f353030bed949b79970d8

      The java test file is in the src/test/java/test/test/Test.java

      If I run mvn verify on that, the dependency plugin does not complain about the fact that the commons-lang3 dependency is not used in compile scope as I would expect it to.

      If I comment the use of the dependency in the Test.java file, then maven-dependency-plugin complains about the non-use of the dependency.

      Am I mistaken on the expected behaviour of analyze?

      Attachments

        Activity

          People

            Unassigned Unassigned
            victor.noel Victor
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: