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

[jira] Created: (MNG-4784) Incorrect result with dependency:analyze for multi-module project

Incorrect result with dependency:analyze for multi-module project
-----------------------------------------------------------------

                 Key: MNG-4784
                 URL: http://jira.codehaus.org/browse/MNG-4784
             Project: Maven 2 & 3
          Issue Type: Bug
    Affects Versions: 3.0-beta-2
         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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MDEP-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann moved MNG-4784 to MDEP-282:
---------------------------------------------

           Complexity:   (was: Intermediate)
    Affects Version/s:     (was: 3.0-beta-2)
                       2.1
                  Key: MDEP-282  (was: MNG-4784)
              Project: Maven 2.x Dependency Plugin  (was: Maven 2 & 3)

> 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

        

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

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311931#comment-311931 ] 

Herve Boutemy commented on MDEP-282:
------------------------------------

I just tested and can reproduce
notice that {noformat}mvn install dependency:analyze{noformat} provides right report

this seems to be related to the fact that package hasn't been done, then dependency is still on a directory

Notice that Maven 2 build simply fails if you don't run install...
                
> Incorrect result with dependency:analyze for multi-module project
> -----------------------------------------------------------------
>
>                 Key: MDEP-282
>                 URL: https://jira.codehaus.org/browse/MDEP-282
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>    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, 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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ 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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ 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

        

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

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier updated MDEP-282:
---------------------------

    Component/s: analyze
    
> Incorrect result with dependency:analyze for multi-module project
> -----------------------------------------------------------------
>
>                 Key: MDEP-282
>                 URL: https://jira.codehaus.org/browse/MDEP-282
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>    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, 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

        

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

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233315#action_233315 ] 

Anders Hammar commented on MDEP-282:
------------------------------------

Ok, so I should file this issue on the mave-dependency-plugin instead? Or can this one be moved?

> 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