You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Victor (JIRA)" <ji...@apache.org> on 2016/04/15 14:37:25 UTC

[jira] [Created] (MDEP-523) Unused dependency not detected when present in test classes

Victor created MDEP-523:
---------------------------

             Summary: Unused dependency not detected when present in test classes
                 Key: MDEP-523
                 URL: https://issues.apache.org/jira/browse/MDEP-523
             Project: Maven Dependency Plugin
          Issue Type: Bug
          Components: analyze
    Affects Versions: 2.10
            Reporter: Victor


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?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)