[ 
https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314098#comment-314098
 ] 

Jason van Zyl commented on MNG-3092:
------------------------------------

For the record what is documented here as it pertains to snapshot resolution in 
ranges is incorrect:

http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-Incorporating%7B%7BSNAPSHOT%7D%7Dversionsintothespecification

If there is a range specification there is no special exclusion for SNAPSHOTs 
currently and right now the behaviour of how snapshots work in ranges works the 
same in 2.x and 3.x. Maybe not ideal but that is where it stands today.

This issues touches on snapshots and pre-releases in general as well as trying 
to take the latest version of a semantically compatible set of versions. I'm 
not sure how to ideally make this work properly for all those use cases with a 
simple fix.

Right now by limiting the repositories that are available to a build you can 
block the inclusion of snapshots. I'm not suggesting this is ideal but you can 
block snapshots from builds if you so choose. I have been looking at this for 2 
days now and it's not something I just want to jam into 3.1.0 so I'm pushing it 
out as the issue now conflates several issues. It will take me a solid week 
just documenting and trying to figure out what's best and discuss it.
                
> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: https://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Jason van Zyl
>             Fix For: 3.1.1
>
>         Attachments: MNG-3092.patch
>
>
> Contrary to the 2.0 design docs:
> "Resolution of dependency ranges should not resolve to a snapshot 
> (development version) unless it is included as an explicit boundary."
> -- from 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-Incorporating%7B%7BSNAPSHOT%7D%7Dversionsintothespecification
> The following is equates to true:
> VersionRange.createFromVersionSpec( "[1.0,1.1]" ).containsVersion( new 
> DefaultArtifactVersion( "1.1-SNAPSHOT" ) )
> The attached patch only allows snapshot versions to be contained in a range 
> if they are equal to one of the boundaries.  Note that this is a strict 
> equality, so [1.0,1.2-SNAPSHOT] will not contain 1.1-SNAPSHOT.

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

        

Reply via email to