Quantcast

[jira] Created: (MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

classic Classic list List threaded Threaded
87 messages Options
12345
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org

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

Sören Chittka edited comment on MNG-3092 at 4/13/12 5:39 AM:
-------------------------------------------------------------

I think most of this discussion does not only apply to SNAPSHOTs but to any kind of qualifier. If I define a version range of [3.0, 4.0), because I expect breaking changes in 4.0, then I don't want any artifact belonging to the 4-series (no '4.0-alpha-1' and no '4.0-SNAPSHOT').
Last time I checked with Maven 3.0.4, '4.0-alpha-1' was included.

In opposition to SNAPSHOTs, other qualified version (like '3.5-beta-2') should be included in the range.
               
      was (Author: soeren.chittka):
    I think most of this discussion does not only apply to SNAPSHOTs but to any kind of qualifier. If I define a version range of [3.0, 4.0), because I expect breaking changes in 4.0, then I don't want any artifact belonging to the 4-series (no '4.0-alpha-1' and no '4.0-SNAPSHOT').
Last time I checked with Maven 3.0.4, '4.0-alpha-1' was included.

In oppostion to SNAPSHOTs, other qualified version (like '3.5-beta-2') should be included in the range.
                 

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Niklas Herder commented on MNG-3092:
------------------------------------

I strongly agree with fixing this so that it conforms to the specification. I don't see how this is even an issue. If the behaviour doesn't need to conform to the specification, then why write it in the first place?

As said above, I don't want a SNAPSHOT version of the next major number to leak into my project, with potentially breaking API changes. I want the stable updates of the current version.
As it is now, the ranges feature is completely useless to us.
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Mirko Swillus commented on MNG-3092:
------------------------------------

This issue is just pain in the neck, and I like to add another strong vote for just implementing the spec right now. As of now we got two options: Do not use ranges (which is quite impossible with more than 40 dependencies in average), or build the snapshot against unstable snapshots (so there is no chance to get a clue about how a final release of that snapshot will behave, because till then everything is build against unstable components (which are build against unstable themselves, and so on). Any solution would be very, very helpful!
 
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Jason Rohman commented on MNG-3092:
-----------------------------------

I would also like to vote for a fix asap. I made the assumption that the spec was already implemented correctly, and now I have to spend more time figuring out how to set my project up with some workaround. If the spec is not good, write another one. If you can't come to a decision on how this will be implemented, then somebody needs to make the executive decision. What ever the path, this need to be resolved and soon. Original post was 5 years ago... just say'n.
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Kristoffer Peterhansel commented on MNG-3092:
---------------------------------------------

Like [~soeren.chittka] and [~herder] said. It makes no sense for the pre-release version of an excluded version to be included in the build.

Just had to work around this myself with using a very high (sub next major) version for the range boundary.
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Brian Topping commented on MNG-3092:
------------------------------------

http://www.infoq.com/news/2012/04/osgi-snapshot and it's comments are a very lively recent (mid-2012) discussion that is worth reading in the context of Maven versions and OSGi.
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Merlijn commented on MNG-3092:
------------------------------

It may be that I'm overlooking something so please point out obvious drawbacks/errors. However; would it not be desirable to:

- IF the project version is a -SNAPSHOT version also resolve dependency ranges to -SNAPSHOT versions
- otherwise ( project is a release version) do not.
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Merlijn edited comment on MNG-3092 at 8/9/12 7:42 AM:
------------------------------------------------------

It may be that I'm overlooking something so please point out obvious drawbacks/errors. However; would it not be desirable to:

- IF the project version is a -SNAPSHOT version also resolve dependency ranges to -SNAPSHOT versions
- otherwise ( project is a release version) do not.

edit; I realise that this would make version resolution context dependent which may be (very?) undesireable
               
      was (Author: merlijn):
    It may be that I'm overlooking something so please point out obvious drawbacks/errors. However; would it not be desirable to:

- IF the project version is a -SNAPSHOT version also resolve dependency ranges to -SNAPSHOT versions
- otherwise ( project is a release version) do not.
                 

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Scott Sosna commented on MNG-3092:
----------------------------------

Another 3 months and no comment.

I agree with Merlijn.  For development, we *always* want to pull in the latest, greatest module to either build against or run pre-acceptance test against.  We have 15+ modules that are loosely-coupled, but developers typically need the latest version of their dependencies.  Towards the end of development, things are locked down, but not early on.

Version ranges worked great with 2.2.1, but with 3.0.4 it is abysmal.  I'd have everyone stick to 2.2.1, except Maven embeds 3.0.4 and insists on using it for resolving dependencies, hence the problem (even if you associate your 2.2.1 install).

Whatever it is, resolve version ranges so we can at least move forward.  Someone in power take a stand and push something - anything - forward so we don't have to wait another 5 years for a solution.
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Mark Derricutt commented on MNG-3092:
-------------------------------------

Since it looks like a 3.1 release of Maven is on the horizon, it would be REALLLY nice to get this sorted - or at least a clear direction/plan of a proposed resolution.
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Herve Boutemy edited comment on MNG-3092 at 11/8/12 12:18 AM:
--------------------------------------------------------------

yes, Maven 3.1 can be a chance to do something
to me, the question is not "is a snapshot in a range?", because the reply is obvious: yes, a snapshot is in the range since a range is a mathematical notion with two bounds and an order (a comparison algorithm)
but the questionis more: "how does Maven choose the best match when multiple artifacts are available matching restrictions?" (I say "restriction" to avoid "range" and since ranges are only one form of restriction)
then we need a use case with a reproducible simple test to work on it (and I need to look for where is the code that makes this choice)

is somebody interested in working in such a direction?
               
      was (Author: hboutemy):
    yes, Maven 3.1 can be a chance to do something
to me, the question is not "is a snapshot in a range", because the reply is obvious: yes, a snapshot is in the range since a range is a mathematical notion with two bounds and a comparison algorihtm
but the questionis more: "how does Maven choose the best match when multiple artifacts are available matching restrictions" (I say "restriction" to avoid "range" and since ranges are only one form of restriction)
then we need a use case with a reproducible simple test to work on it (and I need to look for where is the code that makes this choice)

is somebody interested in working in such a direction?
                 

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Herve Boutemy commented on MNG-3092:
------------------------------------

yes, Maven 3.1 can be a chance to do something
to me, the question is not "is a snapshot in a range", because the reply is obvious: yes, a snapshot is in the range since a range is a mathematical notion with two bounds and a comparison algorihtm
but the questionis more: "how does Maven choose the best match when multiple artifacts are available matching restrictions" (I say "restriction" to avoid "range" and since ranges are only one form of restriction)
then we need a use case with a reproducible simple test to work on it (and I need to look for where is the code that makes this choice)

is somebody interested in working in such a direction?
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Herve Boutemy commented on MNG-3092:
------------------------------------

when I read http://www.infoq.com/news/2012/04/osgi-snapshot, I understand they cannot do SNASPHOT this way:
a SNAPSHOT in Maven is not 1.1.20121108..., but 1.1-20121108...: notice the dash instead of dot, and read [the Maven comparison doc|http://maven.apache.org/ref/3.1-SNAPSHOT/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html] "a dash usually precedes a qualifier, and *is always less important than something preceded with a dot*."

if OSGi can't afford a new separator, they can't do SNAPSHOTs like Maven, or they'll face problem reported by the article: the comparison algorithm is based on a bad trick to change behaviour when a minor number is detected as a timestamp then not treated as a real number
               

> 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
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-3092:
-------------------------------

    Fix Version/s: 3.1.0
   

> 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
>             Fix For: 3.1.0
>
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Sergei Ivanov commented on MNG-3092:
------------------------------------

For me the major annoyance in the current resolution mechanism is that [1.1.0, 1.2.0) appears to include 1.2.0-SNAPSHOT, but exclude 1.1.0-SNAPSHOT, which looks completely counter-intuitive to me. In order to make sure that 1.2.0-SNAPSHOT is never resolved to, one needs to change all range specifications to an equivalent of [1.1.0, 1.1.999] in the above case. This does not solve the problem of not resolving to the initial snapshot in the range (1.1.0-SNAPSHOT in our case). When one starts development of a 1.1.x line, they are forced to change range specifications in dependencies to a fixed 1.1.0-SNAPSHOT version until the time 1.1.0 is released.

Another major annoyance is that whenever there is a snapshot in the local repo and that snapshot is resolved from a version range, the release build of a dependent project is doomed to fail. There is no way to force Maven release execution to disregard snapshots and resolve to released versions only. In fact this is almost a blocker, unless one uses a workaround as described below.

We have a very fluid project consisting of lots of applications and lots of internally developed libraries, and we have to use version ranges for internal dependencies, because otherwise keeping tens of projects in sync with their upstream dependencies becomes a living hell. However, because of this very MNG-3092, we had to make special arrangements in our CI environment in order to make our builds stable and predictable.

In our CI environment, we have two completely Maven settings.xml configurations:
a) configuration for snapshot builds, which resolves from both release and snapshot remote repositories and has its own separate local repository;
b) configuration for release builds, which does only resolve from remote release repositories, and has its own separate local repository.
We use configuration (a) for CI jobs that either run "snapshot vs. snapshot" builds, or nightly code analysis builds. We use configuration (b) for CI jobs that run "snapshot vs. release" builds and for releasing new versions of artifacts (effectively "release vs. release"). Only by separating local repositories and by making sure that snapshots never make their way into local release repository we can make sure that our release builds are stable.

Considering the current issue from a wider perspective, I am curious if there's generally a strong use case for fine-grained control on snapshot resolution (on a dependency declaration level), or whether the snapshot resolution strategy must apply to the entire build execution.

Personally I am leaning towards an execution-level control via e.g. a command line option. This way,
a) one could easily switch between "snapshot vs. snapshot" and "snapshot vs. release" configurations in the same build, without having to set up separate environments. This could especially be useful for IDE integration.
b) maven-release-plugin could automatically suppress resolution of version ranges to snapshots in forked maven executions.
c) no additional changes are required for POM model.

To summarise, here's what I believe the desired behaviour would be, with the option turned on or off respectively:

1. mvn --use-snapshots-in-ranges=false
This includes forked Maven executions from maven-release-plugin.
[1.1.0, 1.2.0] resolves to 1.1.0, 1.1.1, ..., 1.2.0
[1.1.0, 1.2.0) resolves to 1.1.0, 1.1.1, ..., 1.1.99999999999
(1.1.0, 1.2.0) resolves to 1.1.1, 1.1.2, ..., 1.1.99999999999
(1.1.0, 1.2.0] resolves to 1.1.1, 1.1.2, ..., 1.2.0

2. mvn --use-snapshots-in-ranges=true
[1.1.0, 1.2.0] resolves to 1.1.0-SNAPSHOT, 1.1.0, 1.1.1-SNAPSHOT, 1.1.1, ..., 1.2.0-SNAPSHOT, 1.2.0
[1.1.0, 1.2.0) resolves to 1.1.0-SNAPSHOT, 1.1.0, 1.1.1-SNAPSHOT, 1.1.1, ..., 1.1.99999999999-SNAPSHOT, 1.1.99999999999
(1.1.0, 1.2.0) resolves to 1.1.1-SNAPSHOT, 1.1.1, 1.1.2-SNAPSHOT, 1.1.2, ..., 1.1.99999999999-SNAPSHOT, 1.1.99999999999
(1.1.0, 1.2.0] resolves to 1.1.1-SNAPSHOT, 1.1.1, 1.1.2-SNAPSHOT, 1.1.2, ..., 1.2.0-SNAPSHOT, 1.2.0

How does that feel?
               

> 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
>             Fix For: 3.1.0
>
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-3092:
-------------------------------

    Assignee: Jason van Zyl
   

> 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.0
>
>         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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ 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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-3092:
-------------------------------

    Fix Version/s:     (was: 3.1.0)
                   3.1.1
   

> 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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Markus KARG commented on MNG-3092:
----------------------------------

Unfortunately some projects keep publishing pre-releases even into The Central Repository, so it is actually not an option to sort out "pre-release repos", as you would effectively end up with not using Central anymore. The only really clean solution can only be (and this will break backwards compatibility) that pre-releases (hence SNAPSHOTS) are definitively NEVER contained in a range, unless there is a special marker provided to explicitly enable those.
               

> 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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(MNG-3092) Version ranges with non-snapshot bounds can contain snapshot versions

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

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

Mark Derricutt commented on MNG-3092:
-------------------------------------

+1 on pushing to 3.1.1 - I'd rather see some good thoughts/docs and consensus before making any changes here. As Herve mentions the problem is not so much the range resolution, but the version *selection* - an initial thought of mine requires POM schema changes:  adding <selection>lowerbound/upperbound</selection> and <snapshots><enabled>true</enabled></snapshots> (or similar) to the <dependency> element - <selection> could be default to upperbound ( existing behaviour ) or even defaulted to that for <compile> scope, lowerbound for test.  One could even do that without changing the pom, but it is a change in behaviour.

Since the introduction of the dependency:purge-local-repository goal I've also come to add that to my release plugins prepareGoals, this forces any local -SNAPSHOTs to be removed during a release so only released artifacts get used - this actually solves 90% of my initial "no snapshots in ranges" problems.
               

> 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

       
12345
Loading...