You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/08/27 14:09:32 UTC

[jira] Commented: (MDEP-282) Incorrect result with dependency:analyze for multi-module project

    [ http://jira.codehaus.org/browse/MDEP-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233308#action_233308 ] 

Benjamin Bentmann commented on MDEP-282:
----------------------------------------

bq. With Maven 2.2.1, no problems is reported (which is correct).
Well, when running "mvn dependency:tree" against an empty local repository with Maven 2.2.1 (i.e. when module1 hasn't been installed), the command fails to resolve module2's dependency on module1... so this scenario is kinda comparing apples and oranges.

The reason for the discrepancy is that Maven 3 properly resolves the dependency on module1 from the reactor, i.e. by pointing at the {{module1/target/classes}} directory. However, the {{DefaultProjectDependencyAnalyzer}} employed by the Dependency Plugin ignores any artifact whose file doesn't end with ".jar" and hence doesn't see any usage of module1 classes.

> Incorrect result with dependency:analyze for multi-module project
> -----------------------------------------------------------------
>
>                 Key: MDEP-282
>                 URL: http://jira.codehaus.org/browse/MDEP-282
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: MacOS 10.6.4
> Mac Java 1.6.0
>            Reporter: Anders Hammar
>         Attachments: depanalyze-bug.zip
>
>
> I found this regression in Maven 3.0-beta-2 compared to Maven 2.2.1:
> For the attached project, execute
> mvn dependency:analyze
> in the aggregating project.
> This will (incorrectly) report a dependency problem for module2, when executed with Maven 3.0-beta-2. With Maven 2.2.1, no problems is reported (which is correct).
> If executing the analyze in the module2 project with Maven 3.0-beta-2, no problem is reported however.

-- 
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