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

Kunalkumar Somani edited comment on MNG-3092 at 3/23/13 1:58 PM:
-----------------------------------------------------------------

@Sergei, everyone has different view to look at the problem. We have gone back 
and forth on this behavior a couple time.

I totally agree with Tuomas where he has mentioned in last paragraph, it will 
be very tedious for SNAPSHOT range removal before releasing and resetting after 
releasing.

Agree with your idea and can release patch where User can pass property in 
maven command -DuseSnapshotInRange=false and it will exclude all SNAPSHOT from 
range, the default behavior is true, in that case we will have backward 
compatibility as well. It will not impact the existing behavior. The problem 
what I can see here is if we have range defined in parent POM then you need to 
ask reference POM to use this new parameter else it will pick latest SNAPSHOT 
if available in repository.



                
      was (Author: kunalsomani):
    @Sergei, everyone has different view to look at the problem. We have gone 
back and forth on this behavior a couple time.

I totally agree with Tuomas where he has mentioned in last paragraph, it will 
be very tedious for SNAPSHOT range removal before releasing and resetting after 
releasing.

Agree with your idea and can release patch where User can pass property in 
maven command -DuseSnapshotInRange=false and it will exclude all SNAPSHOT from 
range, the default behavior is true, in that case we will have backward 
compatibility as well. It will not impact the existing behavior.The problem 
what I can see here is if we have range defined in parent POM then you need to 
ask reference POM to use this new parameter else it will pick latest SNAPSHOT 
if available in repository.



                  
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to