[jira] Created: (MDEP-152) Analyze main and test dependencies separately

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] Created: (MDEP-152) Analyze main and test dependencies separately

JIRA jira@codehaus.org
Analyze main and test dependencies separately

                 Key: MDEP-152
                 URL: http://jira.codehaus.org/browse/MDEP-152
             Project: Maven 2.x Dependency Plugin
          Issue Type: Improvement
          Components: analyze
    Affects Versions: 2.0
            Reporter: Benjamin Bentmann
            Assignee: Brian Fox

The current design of the maven-dependency-analyzer is mixing apples and oranges. If a POM declares an artifact as a compile time dependency but actually only requires it for test execution, the analysis would be fine because the analyzer ignores scopes.

Therefore, I suggest to split the analysis and its report into:
- used declared main dependencies
- used undeclared main dependencies
- unused declared main dependencies
- used declared test dependencies
- used undeclared test dependencies
- unused declared test dependencies

Analysis of the main dependencies would only include "target/classes" and artifacts with scope "compile"/"system"/"provided" (similar but not equal to ignoreNonCompile=true). Analysis of the test dependencies would consider "target/test-classes" and all available artifacts. As a special case, the group "unused declared test dependencies" should be post-processed by removing all artifacts whose scope is not "test". Otherwise, many of the main artifacts would be reported here.

Finally, a new parameter "excludeTest" should allow to skip the analysis of test dependencies.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira