[ https://jira.codehaus.org/browse/MDEP-399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henning Schmiedehausen updated MDEP-399: ---------------------------------------- Attachment: DEP-399.patch This is the patch against r1411895 of http://svn.apache.org/repos/asf/maven/shared/trunk/maven-dependency-analyzer > 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 > 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: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira