You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Garrett Conaty (JIRA)" <ji...@codehaus.org> on 2005/10/17 06:34:12 UTC

[jira] Updated: (MNG-1207) Recursive dependencies with exclusive bounds fail

     [ http://jira.codehaus.org/browse/MNG-1207?page=all ]

Garrett Conaty updated MNG-1207:
--------------------------------

    Attachment: MNG-1207.diff

Turns out the bug is when the collector tries to restrict versions from looking at previous artifacts of the same kind.  It then restricts and calls 'setVersionRange' on the current and previous artifacts.  HOWEVER, the call to setVersionRange then causes version = null, even though it was specified before as a result of the collector getting the available versions.

I still don't think ResolutionNode.getDependencyTrail could actually be called and not have the versions resolved, but the attached fix anyway just cleans up after the setVersionRange call. 

This is a pretty simple fix, though it was a tricky bug.  IMHO this ought to go into 2.0 because the bug effectively breaks any transitive dependencies that use version ranges.

> Recursive dependencies with exclusive bounds fail
> -------------------------------------------------
>
>          Key: MNG-1207
>          URL: http://jira.codehaus.org/browse/MNG-1207
>      Project: Maven 2
>         Type: Bug
>   Components: maven-artifact
>     Versions: 2.0 (RC)
>     Reporter: Garrett Conaty
>     Priority: Blocker
>      Fix For: 2.0
>  Attachments: MNG-1207.diff
>
>
> ResolutionNode.getDependencyTrail calls artifact.selectVersion(artifact.getSelectedVersion()) even w/o checking artifact.isSelectedVersionKnown().
> It should perhaps have the same handling as DefaultArtifactCollector.recurse(...) which uses retrieveAvailableVersions or getAvailableVersions to then call artifact.getVersionRange().matchVersion(...)
> Example:
> A depends on B which depends on C
> if B depends on C version (1.0,1.1)
> then B resolves the dependencies fine.
> However, if you try to build A, then maven tries to look for C-1.1.jar which is of course outside B's dependency version.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org