[
http://jira.codehaus.org/browse/MDEP-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233308#action_233308
]
Benjamin Bentmann edited comment on MDEP-282 at 8/27/10 7:09 AM:
-----------------------------------------------------------------
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, whereas Maven 2.x uses the potentially outdated JAR from the local
repo. 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.
was (Author: bentmann):
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