[ 
http://jira.codehaus.org/browse/MDEP-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90715
 ] 

Matthew Beermann commented on MDEP-77:
--------------------------------------

In DefaultProjectDependencyAnalyzer, the logic is:

Set declaredArtifacts = project.getDependencyArtifacts();
...
Set usedUndeclaredArtifacts = new HashSet( usedArtifacts );
usedUndeclaredArtifacts.removeAll( declaredArtifacts );

However, the implementation of equals() in DefaultArtifact just does a simple 
String.equals() on the version numbers...

> dependency:analyze is reporting impossible results
> --------------------------------------------------
>
>                 Key: MDEP-77
>                 URL: http://jira.codehaus.org/browse/MDEP-77
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>    Affects Versions: 2.0-alpha-3
>            Reporter: Matthew Beermann
>         Assigned To: Brian Fox
>            Priority: Critical
>
> When I run dependency:analyze, I'm getting back results that appear to be 
> absolutely impossible:
> [INFO] [dependency:analyze]
> [INFO] Used declared dependencies:
> [INFO]    
> com.cerner.system.instrument:system-instrument:jar:2.0-20070320.193427-34:compile
> [INFO]    com.cerner.system:system-core:jar:2.0-20070320.191012-42:compile
> [INFO] Used undeclared dependencies:
> [INFO]    
> com.cerner.system.instrument:system-instrument:jar:2.0-20070320.193427-34:compile
> [INFO]    com.cerner.system:system-core:jar:2.0-20070320.191012-42:compile
> The exact same dependency is both declared and undeclared? I don't think so. 
> My only guess (but this is purely a guess) is that it gets confused by the 
> fact that the version is declared on the POM as 2.0-SNAPSHOT, but comes back 
> with a build number after resolution.

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

        

Reply via email to