You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mark Hobson (JIRA)" <ji...@codehaus.org> on 2007/07/06 15:15:13 UTC

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

Version ranges with non-snapshot bounds can contain snapshot versions
---------------------------------------------------------------------

                 Key: MNG-3092
                 URL: http://jira.codehaus.org/browse/MNG-3092
             Project: Maven 2
          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mirko Swillus (JIRA)" <ji...@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

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@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

        

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

Posted by "Ringo De Smet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=150967#action_150967 ] 

Ringo De Smet commented on MNG-3092:
------------------------------------

Our project contains 200+ Maven2 modules. Currently, we have our CI server build SNAPSHOT versions of all modules, with the dependencies 

First of all, I would have expected version ranges to discard SNAPSHOTS. I didn't know about this bug until today, so I guess we must have been lucky that our CI server only uses a repository that contains released versions.

Assuming this bug wouldn't exist, this is the setup I'm aiming for: all the dependencies between the modules are defined as version ranges. We let our CI server build a complete release from all the modules using the Maven2 release plugin. In parallel, we have all the modules also built for the latest committed code (SNAPSHOT), but still using the released version of the dependencies. We define the version range for all dependencies in every project as a property in the POM. A developer that needs to integrate changes in a few modules wants to override the version range to pick up their local snapshot, or a remote one if available (work from colleagues for example). A developer can do this by defining an active profile and redefining the version properties for the modules they want to change. Such a scenario is independent of the contents of local and remote repositories. Even the remote repositories may contain snapshot artifacts.

Now what is the impact of this bug: with snapshots being picked up "by mistake", we have no control over the setup of all the developer machines! The first developer could have local snapshots of A, B and C, while another developer has snapshots B, C and D. If both want to build E on their local machine, the first could report failure, while the second one could report success. A see a lot of time getting lost trying to track down such scenarios. Don't forget that only a small subset of the developers have the knowledge of Maven2 and the whole project setup. All the others just install Maven2 and execute the build. They are hired to develop code, not to fiddle with Maven2. :-)

So please, fix this bug!

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Scott Sosna (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314385#comment-314385 ] 

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

I'm surprised of the focus for excluding snapshots; I see snapshots as being the main use case of ranges, in a development environment as I and at least one other have described.

For a release artifact, I expect it to have well-known, tested, absolute dependencies.  I don't want dependencies wandering as, for example, new versions of log4j get released.  When the new version of log4j has been tested/approved/certified, then put out a new POM with a slight version modification.  And I would never expect (or use) a released artifact that used snapshots.

However, a snapshot artifact should be able to use ranges referring to both snapshot and released artifacts, as necessary.


Instead of flags to determine inclusion/exclusion of snapshots within ranges, can we base on the type of artifact?
-For released artifacts, ranges only include releases and no snapshots in dependency resolution
-For snapshot artifacts, ranges include both release and snapshots in dependency resolution


The other question is to determine where snapshots fall in a version range.  If you presume that a released artifact represents finality, then snapshots always are less than the released artifact.

[1.0.0,1.3.0] starts at the 1.0.0 release up through the 1.3.0 release.  If the built artifact is a release, then you'd consider all 1.0.x, 1.1.x, 1.2.x releases as well as 1.3.0 itself.  If the build is a snapshot, you'd also consider all > 1.0.x snapshots, all 1.1.x snapshots, all 1.2.x snapshots, and all 1.3.0 snapshots.

[1.0.0-SNAPSHOT,1.0.1] implies building a snapshot artifact, discussed previously, and should consider all 1.0.0.x snapshots, 1.0.0 release, all 1.0.1.x snapshots and 1.0.1 release.

[Not comprehensive examples, but hopefully enough to move the conversation forward.]


Now that this has been moved to 3.1.1, how do we continue this conversation so it doesn't die off again until 3.1.1 is next up.  This must be dealt with eventually.  If no resolution is determined, than at least go back to the functionality as implemented in Maven2.  While not perfect, it doesn't break backwards-compatibility.
                
> 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

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226592#action_226592 ] 

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

Then somethings seriously broken here - my ranges are [1.0,2.0) and that picks up 1.3.12-SNAPSHOT against current nightly builds.

And if Maven 3 is going to magically *STOP* doing that by default, and silently have large impacting functionality changes then I suspect A LOT of complaints and bug reports will start coming in..


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Herve Boutemy (JIRA)" <ji...@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

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@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

        

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102478 ] 

Mark Hobson commented on MNG-3092:
----------------------------------

Cool, I think the best place to discuss the solution is in the thread linked to above - feel free to comment there.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Caspar MacRae (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=317680#comment-317680 ] 

Caspar MacRae commented on MNG-3092:
------------------------------------


This ticket is 5.5 years old - what concerns me is version ranges in Maven are utterly broken by this, and as such warnings should be in place everywhere informing users of this fact.

We have invested considerable time in using version ranges to support semantic versioning, only to find our releases are broken.  


There seems to be discussion about whether this is a bug or a feature - it's a bug, plain and simple; either in implementation or design.



Please, please fix this.
                
> 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

        

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

Posted by "Markus KARG (JIRA)" <ji...@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

        

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

Posted by "Benedikt Waldvogel (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183085#action_183085 ] 

Benedikt Waldvogel commented on MNG-3092:
-----------------------------------------

why not make it optional (via a configuration in the pom eg.) if you are too concerned to change the behavior?

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.2.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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226840#action_226840 ] 

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

Ignore most of that last comment, I just noticed you were commenting on that 2.0.0-SNAPSHOT would be resolved with the ], not the 1.3.5-SNAPSHOT in my repo.

Either way, this is a rather nasty regression that'll break A LOT of builds.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183087#action_183087 ] 

Mark Hobson commented on MNG-3092:
----------------------------------

My current hit list for version ranges is, in addition to this issue: MNG-2994, MRELEASE-262, MRELEASE-318.  Maven 3 has a complete rewrite of the dependency resolution code which, after encountering the original version when writing dependency:tree, is definitely a good thing!

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.2.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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Dave Syer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154057#action_154057 ] 

Dave Syer commented on MNG-3092:
--------------------------------

Can I suggest also that the check for snapshots in the bound includes versions whose qualifier *ends with* Artifact.SNAPSHOT_VERSION (instead of equality check)?  There are many projects out there (including Maven core projects?) that use qualifiers like "alpha-2-SNAPSHOT" or "BUILD-SNAPSHOT".

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Jason Rohman (JIRA)" <ji...@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

        

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

Posted by "Sergei Ivanov (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314135#comment-314135 ] 

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

Snapshots receive special treatment in Maven. For instance, Maven settings and POM model support separation of snapshot and release repositories, there can be multiple timestamped snapshots for the same version, release plugin by default rolls the version from snapshot to release and then to the next snapshot, and so on. Therefore I believe that resolution behaviour for snapshots should be controlled/configured separately from other pre-release versions. I can certainly see a use case for including or excluding pre-releases, betas and milestones from ranges, but although it appears related to the current issue, I would prefer not to mix and mash the two cases together.
                
> 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

        

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

Posted by "Richard Ziegler (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121117 ] 

Richard Ziegler commented on MNG-3092:
--------------------------------------

We have worked around this issue in the following way:

   # Setup multiple repositories internally - one for SNAPSHOT builds, and one for release builds.  (We use Artifactory)
   # Configured maven profiles to select whether the SNAPSHOT repository is active.  
   # Created scripts to rid the local repository of SNAPSHOTS under certain conditions, like when performing a release.

Here is the script we use to perform a release of an artifact.
Notice it just moves one small part of the local repo out of the way.

{code}
#!/bin/zsh
[ -z "$2" ] && {
   echo
   echo "Usage: $0 scmCommentPrefix tag [additional maven opts]"
   echo
   echo "Where:"
   echo " scmCommentPrefix should be the JIRA ID of the release issue, like KWE-55"
   echo " tag is the release number, like 1.1"
   echo " optional additional maven opts, like -Paxis"
   exit 1;
}

d=$(dirname `which $0`)
. $d/fixenv.sh

# maven chokes on cygwin svn in path prior to native port... so fix path if on cygwin
[ -d /cygdrive/c/opt/svn-win32-1.4.5/bin ] && PATH="/cygdrive/c/opt/svn-win32-1.4.5/bin:$PATH"

pre=$1
tag=$2
shift 2

# Swap out qa dir of local repo that may have snapshots for one that doesn't
qar=${qar:-~/.qa-release}
qas=${qas:-~/.qa-snaps}
ciq="$ILM2_REPO/com/company/qa"

echo MOVING AWAY SNAPSHOT CONTAMINATED LOCAL REPO
[ -d $qas -a -d $ciq ] && rm -rf $qas
[ -d $ciq ] && mv -v $ciq $qas
[ -d $qar ] && mv -v $qar $ciq

export MAVEN_OPTS="$MAVEN_OPTS -DSNAPS=false"

mvn clean install ${=*} && \
mvn release:prepare -DscmCommentPrefix="$pre " -Dtag=$tag ${=*} && \
mvn release:perform -DscmCommentPrefix="$pre " -Dtag=$tag -Dgoals=deploy ${=*}

# restore qa dir of local repo
echo RESTORING SNAPSHOTS TO LOCAL REPO
[ -d $qar -a -d $ciq ] && rm -rf $qar
[ -d $ciq ] && mv -v $ciq $qar
[ -d $qas ] && mv -v $qas
{code}

Good luck-

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.x
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240090#action_240090 ] 

Barrie Treloar commented on MNG-3092:
-------------------------------------

Michael, please update the user wiki with your advice.
Then its searchable via google and it can be referenced.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@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

        

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102459 ] 

Mark Hobson commented on MNG-3092:
----------------------------------

Started discussion on the suggested fix:
http://www.mail-archive.com/dev@maven.apache.org/msg68512.html

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Sander Verhagen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183086#action_183086 ] 

Sander Verhagen commented on MNG-3092:
--------------------------------------

I believe that MNG-3092 currently is the only thing that needed patching in our entire set-up for ranges to work. That's why I vote strongly for this one ;-)

Of course "to work" refers to our way it's been set-up, and there are many ways, as to say that I'm not implying at all that you are doing it wrong. As for Maven 3... I just hope it never comes out ;-) I remember the earlier days of Maven 2. If we'd get a similar amount of growing pains for 3, I'd happily sign for staying with 2.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.2.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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Brian Topping (JIRA)" <ji...@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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257777#action_257777 ] 

Benjamin Bentmann commented on MNG-3092:
----------------------------------------

A related use case: [Dependency Resolution and Version Range Conflicts |http://maven.40175.n5.nabble.com/Dependency-Resolution-and-Version-Range-Conflicts-td3400390.html]

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=140552#action_140552 ] 

John Casey commented on MNG-3092:
---------------------------------

I'd tend to favor the approach suggested by kenney on the mailing-list thread for this issue. Something like:

{noformat}
[1.1-1.2]{snapshots=false}
{noformat}

would approximate the sort of advice given to regular expressions in other languages (and maybe in java, can't remember), so there is some precedent. IMO, we can't find a "pure" way to switch this behavior on/off using straight range syntax as we've used it before.

Also, it's legitimate to me to exclude snapshots, since by definition snapshots are part of a development effort...as such, they could contain major regressions and other nasty bugs from version to version. So having a range like the above, I'd almost say the default should *exclude* snapshots, and use something like '\{snapshots=true}' to *enable* them...

I'm happy to put this code in place, but it may have to wait for 2.0.11 so we can have some soak time, to make sure it doesn't hose anything else.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Phil Segal (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182950#action_182950 ] 

Phil Segal commented on MNG-3092:
---------------------------------

Hi

It seems that this fix has been somewhat forgotten? Is there any update as to when a fix may be available?


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.2.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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "David Hoffer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_105043 ] 

David Hoffer commented on MNG-3092:
-----------------------------------

Oops I didn't mean to add that last comment...  What is the status of this issue?  I have not been able to post to the above mentioned email thread.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Sergei Ivanov (JIRA)" <ji...@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

        

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

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey updated MNG-3092:
----------------------------

    Fix Version/s:     (was: 2.0.10)
                   2.0.11

any solution for this will be complex enough to warrant as much "soak" time as possible...would be good to get this in on the front end of the next iteration.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "David Hoffer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_105039 ] 

David Hoffer commented on MNG-3092:
-----------------------------------

Since this issue has been closed you might want to watch/vote for MNG-3092 which replaces it.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Scott Sosna (JIRA)" <ji...@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

        

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

Posted by "Paul French (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=266659#action_266659 ] 

Paul French commented on MNG-3092:
----------------------------------

If you consider semantic versioning http://semver.org/ where by using carefully chosen version numbers (enforced by an api analysis tool) and version ranges to specify your dependencies between your components then version ranges need to support some basic ideas.

I have component A [1.0.0] and component B [1.1.0] and component A depends on component B with version range [1.0.0,1.2.0)

   A [1.0.0] depends on B [1.0.0,1.2.0)

We start additional development on B so it will initially be B [1.1.1-SNAPSHOT] So A will pull this in it's current dependency i.e. B [1.1.1-SNAPSHOT] as a dependency (the current behaviour of maven 3.0.3)

Work continues on B and someone adds a method to an interface which is used by A, component B's version is increased to [1.2.0-SNAPSHOT] to signal the possible incompatible change since verion B [1.1.0]

If you think about it, this snapshot of B could be incompatible to A so we need to exclude it in our version range i.e. we modify componment A's dependency version range on B to exclude the 1.2.0-SNAPSHOT

   A [1.0.0] depends on B [1.0.0,1.2.0-SNAPSHOT)

So already I'm not liking this since I have to specify I don't want the 1.2 SNAPSHOT but I can live with it.

However the dependency pulled in for A will now always be B [1.1.1-SNAPSHOT], there will never be a release of B[1.1.1] made by us, our baseline is B[1.1.0] and we have not made a new baselien release yet for component B

I've concluded but I could be wrong that you need to be able to say whether you want to include or exclude SNAPSHOT in your version ranges. We develop OSGi bundles. Using the PDE analysis API tooling we compare on going development of bundles with a baseline release and update the POM/Bundle-Manifest version as appropriate depending on code changes. So we require to use version ranges with snapshots included when doing CI but do not include SNAPSHOT when doing releases.

I actually would prefer A [1.0.0] depends on B [1.0.0,1.2.0) to actually mean...

   "A depends on B from 1.0.0 up to but NOT including 1.2.0 or 1.2.0-SNAPSHOT"

>From our point of view, if you do not want 1.2.0 since it will be incompatible then you do not want 1.2.0-SNAPSHOT either since it will also be incompatible.

To be clear B [1.1.1-SNAPHOT] is valid in the range above by default.

However when building a release we would like to set a property or something equivalent (not in the POM, you do not want to have to go through all the POMS) and exclude SNAPSHOT in version ranges.

I suspect other people may require other scenarios so I see some form of pluggable version range strategy being the answer. You plugin the functionality you require. The default behaviour will be what I have outlines :)

My 10 pence 

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Alex Miller (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183088#action_183088 ] 

Alex Miller commented on MNG-3092:
----------------------------------

Due to this bug we also gave up on version ranges (and might ultimately give up on maven....although we haven't gone there yet).

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.2.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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Frank Ulbricht (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=280051#comment-280051 ] 

Frank Ulbricht commented on MNG-3092:
-------------------------------------

After converting our complete release process to Maven we have stumbled over this problem. Because of the sheer number of dependencies we are forced to use version ranges. But now some projects refering to SNAPSHOTs and we are not able to release anything without touching all the POMs. So whatever solution you prefer, it will be welcome. But it seems the problem is to agree on a solution. So let me add a vote for the [1.0.0,1.2.0-SNAPSHOT) approach...

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

        

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

Posted by "Sander Verhagen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183082#action_183082 ] 

Sander Verhagen commented on MNG-3092:
--------------------------------------

This one looks much like, what we like to call a "hot potatoe", in Dutch. Too hot to handle, to much risk, perhaps, of breaking things. I've sort of given up hope for this one to be fixed, and (yes, repeating myself) resorted to patching it ourselves.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.2.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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Sei Syvalta (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240441#action_240441 ] 

Sei Syvalta commented on MNG-3092:
----------------------------------

I think the most severe issue is that you can't release anything which contains a version range currently. You just get an error that the release contains a SNAPSHOT version and the release fails. This basically means that the whole version range feature is not usable at all. I wouldn't  consider fixing this bug as a regression, because the specification has been clear from the start (SNAPSHOTs shouldn't be included).

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Herve Boutemy (JIRA)" <ji...@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

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226839#action_226839 ] 

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

Even using [1.0.0,2.0.0-SNAPSHOT] to include the 2.0.0-SNAPSHOT doesn't work - which is good as you'd NOT want 2.0.0-SNAPSHOT ( assuming you're changing major version numbers for breaking changes to an API ).

If it did, things would be even worse as you're saying "I'm going to allow this major API change to bleed into project, but only if its not released" - one may as well not use ranges in that case.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232184#action_232184 ] 

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

Further to this, as I've mentioned previously this currently breaks both our build, and our integration tests.  The ITs I think I can handle differently, but the build I think should still work.

In our POMs, we refer to say [2.0.0,3.0.0) for all our project dependencies, this is the output of our current build:

{code}

[INFO] ------------------------------------------------------------------------
[INFO] Building smx3.statistics.standard 2.1.11-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] artifact smx3:smx3.statistics.api: checking for updates from Nexus
[INFO] artifact smx3:smx3.reporting: checking for updates from Nexus
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] smx3.parent ....................................... SUCCESS [0.590s]
[INFO] smx3.cachesupport ................................. SUCCESS [6.520s]
[INFO] smx3.util ......................................... SUCCESS [8.716s]
[INFO] smx3.rest ......................................... SUCCESS [5.671s]
[INFO] smx3.hibernate .................................... SUCCESS [4.273s]
[INFO] smx3.schema ....................................... SUCCESS [8.838s]
[INFO] smx3.api .......................................... SUCCESS [4.376s]
[INFO] smx3.schema.provider .............................. SUCCESS [1.692s]
[INFO] smx3.entity ....................................... SUCCESS [3.033s]
[INFO] smx3.testing ...................................... SUCCESS [2.681s]
[INFO] smx3.ldap ......................................... SUCCESS [1.865s]
[INFO] smx3.mounting ..................................... SUCCESS [3.074s]
[INFO] smx3.email ........................................ SUCCESS [1.701s]
[INFO] smx3.translation .................................. SUCCESS [3.944s]
[INFO] smx3.validation ................................... SUCCESS [2.773s]
[INFO] smx3.rules ........................................ SUCCESS [9.373s]
[INFO] smx3.partyresource ................................ SUCCESS [16.961s]
[INFO] smx3.statistics.api ............................... SUCCESS [2.117s]
[INFO] smx3.pdf .......................................... SUCCESS [3.588s]
[INFO] smx3.reporting .................................... SUCCESS [6.325s]
[INFO] smx3.statistics.standard .......................... FAILURE [0.900s]
[INFO] smx3.agreement .................................... SKIPPED
[INFO] smx3.statistics.resources ......................... SKIPPED
[INFO] smx3.template ..................................... SKIPPED
[INFO] mock-template-service ............................. SKIPPED
[INFO] smx3.invoicing .................................... SKIPPED
[INFO] smx3.monitoring ................................... SKIPPED
[INFO] smx3.defaultconfiguration ......................... SKIPPED
[INFO] smx3.restfulobr ................................... SKIPPED
[INFO] smx3.mailhosting .................................. SKIPPED
[INFO] smx3.agreement.reports ............................ SKIPPED
[INFO] smx3.entitysearch ................................. SKIPPED
[INFO] smx3.smartrules ................................... SKIPPED
[INFO] smx3.email.resources .............................. SKIPPED
[INFO] SMX3 Maven Modules ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:41.178s
[INFO] Finished at: Tue Aug 10 12:49:42 NZST 2010
[INFO] Final Memory: 44M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project smx3.statistics.standard: Couldn't find a version in [1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 2.0.1, 2.0.2, 2.1.1, 2.1.2, 2.2.1, 2.3.1, 2.4.1-SNAPSHOT] to match range [2.4.0,3.0.0)
  smx3:smx3.statistics.api:jar:null
{code}

In this instance, smx3.statistics.standard-2.4.1-SNAPSHOT is being built as part of a reactor-build, and the unreleased changes in this artifact are being used by later artifacts.

IMHO, a solution to this version range issue would be to have maven resolve a -SNAPSHOT as part of a range ( original behaviour ) IF that artifact is currently involved in the current reactor process.

This way, the build process here would work fine, but releasing each artifact individually would look for the non-SNAPSHOT as its not part of a reactor process.

Would this be an acceptable change?


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Kristoffer Peterhansel (JIRA)" <ji...@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

        

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

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3092:
------------------------------

    Fix Version/s: 2.0.x

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.x
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226976#action_226976 ] 

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

I thought I'd come up with a work around by deploying my SNAPSHOT's to my local nexus, given that M3 enforces timestamp'd artifacts rather than -SNAPSHOT.jar files.  However, as the metadata still says it's a SNAPSHOT the resolution still fails to resolve the artifact.


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Merlijn (JIRA)" <ji...@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

        

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Hobson updated MNG-3092:
-----------------------------

    Attachment: MNG-3092.patch

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Erik Schepers (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251429#action_251429 ] 

Erik Schepers commented on MNG-3092:
------------------------------------

I strongly agree with Syvalta.

We are currently using ranges in our projects, and are now only able to perform releases on maven-3.0-beta-1, as this issue was resolved in that version only. As I understand the enforcer-plugin does not solve this problem, it provides only an after-the-fact observation.

The specification has been clear, so why not fix this issue on the short term (3.0.2?)

I wouldn't mind to have to add the {{\[x,y){use-snapshots=false\}}} to explicitly exclude snapshots, while the default behaviour stays as it is now (include snapshots in the range). I also wouldn't mind a command-line option to disable snapshots in ranges explicitly. 

But at least I need something to be able to perform a release in combination with version-ranges. With the current state of maven-3, that's not possible (or at least I don't know how).

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_109683 ] 

Mark Hobson commented on MNG-3092:
----------------------------------

AFAIK this issue is still up for debate.  You can reply to the thread by subscribing to the maven-dev mailing list, or alternatively register and use nabble:
http://www.nabble.com/Version-ranges-and-snapshots-tf4035629s177.html

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "David Hoffer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_120773 ] 

David Hoffer commented on MNG-3092:
-----------------------------------

Can we decide what we are going to do regarding this bug?  This issue has been going on for a long time and some resolution is needed now.

In the past, we have made manual patches of maven to fix this bug.  However now I have found that I need to upgrade to 2.0.8 and I cannot because of this issue (there may also be other places in maven where this needs to be applied as well).  I.e. since the release plug-in did not use maven's core to handle version ranges we had to patch it as well, once this is fixed I would assume it should use the core instead of duplicating logic.

I have found that release-plugin 2.0-beta-6 & 2.0-beta-7 are broken with respect to 2.0.8 if using version ranges, refer to MNG-3351.

The current situation at our company is dire; we have spent the last 2 years implementing an enterprise CI build system using maven.  Now we find ourselves in a situation were builds do not work anymore and I can find NO workaround.  That is, I have deploys that now fail because I (assume) am tripping over transitive dependency bugs that have been fixed but I cannot use because I cannot get to 2.0.8.  I cannot go to 2.0.8 because with it most releases fail (again see MNG-3351).

As far as I can tell, all of the failures are caused by usage of version ranges; hence the need for this bug to be fixed.

It seems the main proponent of retaining the current behavior of version ranges, gets around this issue because he does not use snapshots (does not deploy snapshots).  He simply replaces snapshot builds with releases and then manually tags the releases with metadata to indicate the good vs. bad releases.  I am not convinced that this is the best way to go for an enterprise CI build system.  I feel the normal maven usage of snapshots and releases is too great to give up.

I am at a point now that I need to know if this will be fixed or not, if yes you will make us very happy, as we can continue with Maven.  However if it cannot be fixed I am forced into either not using version ranges or not using Maven.  We are an international company with well over 100 engineers, it would be great to be able to use maven globally but because of this issue we are forced to rethink our maven usage.

First, let me be clear why we are using version ranges.  For internally developed components & applications we make a contract with component developers/consumers that we will not (knowingly) break an existing API unless the major version changes, because of this contract we want developers/consumers to always use the latest version of a released component.  Not only does always using the latest released version force usage of that component so we can find problems, apply fixes, etc it also is our dependency version management system.  We don't need to ever say what version we want to release with because we always want that which version range is supposed to give us, i.e. the latest released version.  (Note we always state the range of versions we will accept, i.e. [1.23, 2.0).

Is there a way I can get this behavior without version ranges?  I would be happy to use a different syntax if available.

Now my first option (if this cannot be fixed asap) is to not use version ranges.  How can I get this behavior without them?  I am not familiar with the other mechanisms maven may have for dependency management.  Is there some other technique I can use?  If I were to fix all versions could I write some plug-in that would/could dynamically look for latest released versions and then rewrite the pom to use what it finds?

Lastly, I hate to say it but we could move to something other than maven.  I understand there are maven like systems, i.e. buildr, that attempt at least to not have these problems.  How many other large companies find they can use maven across the entire enterprise?  I note there are 14 votes to fix this issue, how are the other 13 working around this bug?  I suspect that most using maven are not using it internally to create libraries of reusable components that are consumed by others within the same organization.  If there are, I would love to hear how they resolve this issue.

Regards,
Dave Hoffer
X-Rite, Inc.  


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.x
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Pieter Iserbyt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226797#action_226797 ] 

Pieter Iserbyt commented on MNG-3092:
-------------------------------------

As to the specs, the range (1.0.0,2.0.0-SNAPSHOT) should solve your problem?

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226897#action_226897 ] 

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

After getting Maven 3 running again I retried our builds at $work with it, I did like the lack of -SNAPSHOTs being resolved for working with individual artifacts as it drove me to actually release some long standing 'test support' artifacts.  And I see a good upside of this would be much more regular releasing of artifacts across the board.

However, when it came to running our integration tests, which use the maven-dependency-plugin to copy all of our projects artifacts (listed as test dependencies) to the target directory, and deploy them into an OSGi container, it was apparent that we'd have to drop the use of version ranges and modify the test projects dependencies EVERY TIME one of the projects artifacts changed, as the ranges no longer resolve -SNAPSHOTs.

If this change is going to go ahead and stay in maven 3 - is there an alterative way of doing the above, where an integration build wants to pull in all available SNAPSHOT releases.

Ideally, I'd love to see this new behavior the default in Maven 3, but with an override setting to add into the maven-dependency-plugin or somewhere to allow for SNAPSHOTs.

Mark


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183084#action_183084 ] 

Mark Hobson commented on MNG-3092:
----------------------------------

Personally, I've given up attempting to use version ranges in Maven 2 due to the numerous bugs surrounding them.  Hopefully Maven 3 will be the much needed panacea..

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.2.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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Sander Verhagen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=150971#action_150971 ] 

Sander Verhagen commented on MNG-3092:
--------------------------------------

FYI. We've resorted to using our own Maven build where we've literally applied the patch that this issue started with. Unfortunately.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Bruno Medeiros (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=317682#comment-317682 ] 

Bruno Medeiros commented on MNG-3092:
-------------------------------------

Caspar, for me it's also clear that it is a bug. We've also spent a lot of time to use version ranges in our projects, and double time to remove all versions from all projects, because of this and other version ranges bugs.

Considering the age of this ticket, and the posts made by maven maintainers (mainly Jason van Zyl) recently, I don't think we'll have a decent fix for this soon. The only short term solution I can see is fork, which unfortunately I don't have resources to do. 
                
> 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

        

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

Posted by "Merlijn (JIRA)" <ji...@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

        

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

Posted by "Bruno Medeiros (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279691#comment-279691 ] 

Bruno Medeiros commented on MNG-3092:
-------------------------------------

I agree someone can find some usefulness in resolving a snapshot with neither the lower limit nor upper limit of the range being a SNAPSHOT, but to support these cases we're transforming version ranges in a useless function IMHO.

Resolving a snapshot without any snapshot boundary makes no sense to me. It's against the own concept of ranges. If you declare a range, you are saying that you project WILL work with any version that matches this range, so why people say that the snapshot should be resolved? why would you choose a snapshot if you can choose a release as both match? If you need something that is only on the latest snapshot, you should go to you pom and change the range boundary to say that.

Have such a bug open for this long time, without a workaround, is a shame! If the community don't agree about a solution, so let's use the most voted, the one the project leader decides, or whatever. Do NOTHING just to be backward compatible is the WORST option.

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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-3092:
-----------------------------------

    Fix Version/s:     (was: 3.0-beta-1)

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "David Hoffer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102468 ] 

David Hoffer commented on MNG-3092:
-----------------------------------

I think this is same/similar to MNG-3001, you might want to compare this patch to the patch submitted in MNG-3001.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@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

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@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

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://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: 2.2.2)
                   3.0-alpha-7

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-alpha-7
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226769#action_226769 ] 

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

Looks like the nightly SNAPSHOTs are actually broken in respect this
as well, for some reason my machine had reverted its path settings.

Anyway, I've set up a sample repo with two projects that demonstrate
this problem:

http://github.com/talios/maven-versionrange-test

In this repo, the dependency on releasetest-api is set at
(1.0.0,2.0.0) - which should pick up the 1.3.5-SNAPSHOT, and under
2.2.1 it does, but under 3.0 it doesn't.

I can understand the reasoning behind limiting the SNAPSHOT resolution
for day-to-day projects and for releases, but in the instance of a
C.I. build server doing integration tests, you really want those
SNAPSHOTs to resolve and be used.

If I'm working on 2-3 modules locally I'd also want them to pick up
those SNAPSHOTs without having to release things all the time.

If this change is going to go ahead for the final M3 release, how are
we supposed to use ranges in any sane fashion?  We tend to stick to a
model of bumping the major version number on "backwards incompatible
API changes", the minor number on "API addition changes" and the 3rd
patch number for general revs of a bundle.  If we were to release all
the time just to satisfy ranges, we could be bumping major/minors
quite often...

Look forward to hearing some comments from you all.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox updated MNG-3092:
---------------------------

    Fix Version/s:     (was: 2.0.x)
                   2.0.10

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.10
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "David Hoffer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102474 ] 

David Hoffer commented on MNG-3092:
-----------------------------------

Yes, a good resolution is all I care about :)

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Tobias Sarnowski (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216990#action_216990 ] 

Tobias Sarnowski commented on MNG-3092:
---------------------------------------

We are also very interested how the status of this very serious issue is. I tested it with a recent subversion snapshot of maven3 and this issue is still consistent. Will there be any fix in the near future or is it already possible with a special configuration?

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314133#comment-314133 ] 

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

Pushing pre-releases into Maven Central is perfectly acceptable. I agree that we need to deal with pre-release filtering but blocking their publication from Maven Central is not the answer. Projects need to be able to share these versions to vet them. It needs to be a filter on the client. So yes, without writing something currently or patching Maven it's not possible to block. So allow a pluggable DependencySelector to Aether is the answer here. But we need to find a way to expose it. I understand your concern.
                
> 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

        

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

Posted by "Erik Schepers (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215911#action_215911 ] 

Erik Schepers commented on MNG-3092:
------------------------------------

Is there any change that this issue is going to be fixed soon?

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-alpha-8
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Niklas Herder (JIRA)" <ji...@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

        

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

Posted by "Herve Boutemy (JIRA)" <ji...@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

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226525#action_226525 ] 

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

When using the nightly maven 3 builds from https://grid.sonatype.org/ci/job/maven-3.0.x-bootstrap/jdk=1.5,label=ubuntu I still see version ranges including SNAPSHOT versions ( which for my integration tests is a good thing, but not for releases ).

Can anyone else confirm that this change works in current M3 builds?  Is the old behavior able to be reenabled at all?


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Derricutt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226836#action_226836 ] 

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

Nope.  My understanding is that the new behavior is to only resolve SNAPSHOTs at the upper/lower bounds -IF- they're mentioned.  i.e. (1.0.0,2.0.0-SNAPSHOT) would resolve 2.0.0-SNAPSHOT correctly as it's explicitly mentioned, but no other SNAPSHOT would be resolved.

Changing the range in my mini project shows this to still not resolve.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Scott Sosna (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=317681#comment-317681 ] 

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

Another problem we've run into is that the Eclipse m2e plugin forces Maven 3.x for dependency resolution and it can take 40-60 minutes because it looks at each artifact individually, whereas Maven2 is smarter (don't know the details) and finishes in seconds.

I'd propose that the verion-range functionality of Maven2 gets restored in Maven3 until a complete, properly-thought-out, properly-implement solution becomes available.

                
> 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

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226561#action_226561 ] 

Benjamin Bentmann commented on MNG-3092:
----------------------------------------

bq. I still see version ranges including SNAPSHOT versions
As given by the wiki page referenced by the issue description, SNAPSHOTs are only included in a range if they appear as one of the boundaries.

bq. Is the old behavior able to be reenabled at all
No.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=140557#action_140557 ] 

Barrie Treloar commented on MNG-3092:
-------------------------------------

{quote}
I'd almost say the default should exclude snapshots, and use something like '\{snapshots=true\}' to enable them...
{quote}

Yes, the default should be to exclude snapshots.

For most projects the only thing that would possibly include snapshots would be your own internal work, or bleeding edge case stuff.
Otherwise you would using pure releases.


> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann reopened MNG-3092:
------------------------------------

      Assignee:     (was: Mark Hobson)

Reverted in [r997380|http://svn.apache.org/viewvc?view=revision&revision=997380]. This needs to be addressed differently in order to satisfy all use cases.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Sander Verhagen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148596#action_148596 ] 

Sander Verhagen commented on MNG-3092:
--------------------------------------

This issue feels a little like being abandonned due to disagreement on the solution. Is there any chance that the given patch is just applied as is?

It is working fine as a solution to the problem at hand. (And yes, that is a mere opinion.)

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Michael McCallum (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240087#action_240087 ] 

Michael McCallum commented on MNG-3092:
---------------------------------------

I _really_ like ranges resolving snapshots. Not including snapshots is a process problem not a technical one. Use the enforcer plugin to avoid snapshots in releases.

I use version ranges and have done so for over 3 years, very successfully on large and small projects. Changing this behaviour IMO would make it much harder to implement decent CI testing HEAD to HEAD, HEAD to RELEASE and RELEASE TO RELEASE.

It used to be important for project linking with m2eclipse but not for the last 14 months or so.

A big _no_ vote from me.

p.s. If anyone wants advice on setting up ranges to work properly I can give you some good advice.



> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Markus KARG (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251744#action_251744 ] 

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

I want to vote for a clean and intuitive design: [1.5, 1.6) must not include SNAPSHOTs, [1.5, 1.6-SNAPSHOT) must include SNAPSHOTs. This is absolutely intuitive to most Maven beginners I have asked about their feeling, and it is simple to fix for those why rely on snapshots. I do neither like the idea to make it more complex to exclude snapshots as it is SO SIMPLE AND CLEAR TO READ as writing -SNAPSHOT to include them, nor do I like the idea to wait for more months to get a solution finally. Also I want to point out that it is just obvious that if my project is dependent on a third party library, writing [1.5, 1.6) means that I want specification version 1.5 with latest bug fixes but not features in progress, which is the mosty typical use case. The only case I do see when I want to include SNAPSHOTS is when I do have the dependency in the reactor. Why not making just this single difference? Then nobody must learn a new syntax, it would work as designed and intuitive, and it would actually be very intuitive to also include SNAPSHOTs from stuff in my own reactor.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Posted by "Sören Chittka (JIRA)" <ji...@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 commented on MNG-3092:
------------------------------------

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

       

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102470 ] 

Mark Hobson commented on MNG-3092:
----------------------------------

Thanks for the pointer - I've linked that issue in.  I had a look at that patch and it appears to be a subset of this one, since:

- the MNG-3001 patch fails two tests in this patch: testSnapshotRangeBoundsCanContainSnapshots and testSnapshotSoftVersionCanContainSnapshot
- this patch passes all tests provided in the MNG-3001 patch

Hence I'd like to mark MNG-3001 as a duplicate of this - is that okay with you?

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314137#comment-314137 ] 

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

this Jira issue is about SNAPSHOTs only, and not only at range bounds but inside the range
pre-release exclusion from upper-bound is done in MNG-5353
and we have no Jira issue for the moment for pre-releases exclusion inside 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
>            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

        

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

Posted by "Sören Chittka (JIRA)" <ji...@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

       

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

Posted by "David Hoffer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103199 ] 

David Hoffer commented on MNG-3092:
-----------------------------------

Apparently, I cannot reply to the above mentioned link.  I replied via email but it is not on that link.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154065#action_154065 ] 

Mark Hobson commented on MNG-3092:
----------------------------------

It does, it tests equality with the version's qualifier: {{Artifact.SNAPSHOT_VERSION.equals( version.getQualifier() )}}.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 2.0.11
>
>         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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226838#action_226838 ] 

Benjamin Bentmann commented on MNG-3092:
----------------------------------------

bq. My understanding is that the new behavior is to only resolve SNAPSHOTs at the upper/lower bounds IF they're mentioned
Correct.

bq. (1.0.0,2.0.0-SNAPSHOT) would resolve 2.0.0-SNAPSHOT
No, because you specified the right boundary to be not included.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Arik Kfir (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=244032#action_244032 ] 

Arik Kfir commented on MNG-3092:
--------------------------------

+1 for including SNAPSHOTs in the version ranges if the artifact is in the reactor. I also liked the [x,y){use-snapshots=true} proposal.
I also agree that this is a process problem and should be enforced by the enforcer plugin, rather than maven core itself. 

Btw, besides CI builds, another use-case in favor of including SNAPSHOTs in ranges is IDE integration; we have a project consisting of multiple inter-dependant modules and having them resolve to each-other using ranges is very convenient, rather than updating the POMs everytime one of them is released.

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-3092.
----------------------------------

    Resolution: Fixed

Applied Mark's patch in [r931890|http://svn.apache.org/viewvc?view=revision&revision=931890].

> Version ranges with non-snapshot bounds can contain snapshot versions
> ---------------------------------------------------------------------
>
>                 Key: MNG-3092
>                 URL: http://jira.codehaus.org/browse/MNG-3092
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: Mark Hobson
>            Assignee: Mark Hobson
>             Fix For: 3.0-beta-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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Lars Weber (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288221#comment-288221 ] 

Lars Weber commented on MNG-3092:
---------------------------------

I can confirm this bug.
I don't see that the discussion is necessary, because the behavior is explained in the specification:

{quote}
*Incorporating SNAPSHOT versions into the specification*
{color:red}*Resolution of dependency ranges should not resolve to a snapshot (development version) unless it is included as an explicit boundary.*{color} There is no need to compile against development code unless you are explicitly using a new feature, under which the snapshot will become the lower bound of your version specification. As releases are considered newer than the snapshot they belong to, they will be chosen over an old snapshot if found.

It is possible that applications such as Continuum may have a mode that enables always resolving to the snapshot version, but this is external to the POM itself.
{quote}
Source:[http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges]

So my vote goes to the implementation according to the specification.
                
> 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