[ https://jira.codehaus.org/browse/MDEP-399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Fox closed MDEP-399. -------------------------- Resolution: Fixed Fix Version/s: 2.7 Assignee: Brian Fox > 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.0-alpha-4, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.5.1, 2.6 > Reporter: Tim Williamson > Assignee: Brian Fox > Fix For: 2.7 > > Attachments: DEP-399.patch, 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 For more information on JIRA, see: http://www.atlassian.com/software/jira