Tim Williamson created MDEP-399:
-----------------------------------
Summary: Multi-module dependencies incorrectly marked as unused
Key: MDEP-399
URL: https://jira.codehaus.org/browse/MDEP-399
Project: Maven 2.x Dependency Plugin
Issue Type: Bug
Components: analyze
Affects Versions: 2.6, 2.5.1, 2.5, 2.4, 2.3, 2.2, 2.1, 2.0, 2.0-alpha-4
Reporter: Tim Williamson
Attachments: mda-test.tar
MDEP-72 made DefaultProjectDependencyAnalyzer.buildArtifactClassMap() only
consider jar files, i.e.:
{code}if ( file != null && file.getName().endsWith( ".jar" ) ){code}
This causes it to ignore all classes defined in a submodule of a multi-module
project. See the attached example. It has two submodules:
- a, which defines an interface Foo
- b, which defines a class FooImpl that implements Foo
Running "mvn dependency:analyze" results in:
{code}
[WARNING] Unused declared dependencies found:
[WARNING] com.example:a:jar:0.0.1-SNAPSHOT:compile
{code}
The following change fixes the issue:
{code}if ( file != null && (file.getName().endsWith( ".jar" ) ||
file.isDirectory()) ){code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira