[ https://jira.codehaus.org/browse/MNG-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=350888#comment-350888 ]
David Hoffer commented on MNG-3092: ----------------------------------- You can spin this anyway you want but the bottom line is 'The current functionality works fine' is a false statement and 'change the spec' is a horrible idea. As with any software library or tool you want a 'no surprises' implementation, e.g. you want folks that use this feature to walk away saying yeah that worked great...just the way I expected it to work. To say that now the Maven ecosystem can only work with subsets of the possible version numbers that folks will want to use...and yes they all will want to use version 1.0...is a horrible idea. If your writing a book or documenting this...I suggest that honesty is the best policy. The spec as stated both makes logical sense and we can agree it has high practical usefulness. So just be honest and tell folks Maven didn't make it on this issue (yet), you might have workarounds but at best they are just that...a hack or workaround...until this issue gets resolved in Maven (if ever). ...just a couple more points...if the hack/workaround involves a lot of system configuration changes just to get this to work...that's going to turn off a lot of folks...e.g. give voice to the why is Maven so difficult to work with/etc statements. Also I doubt that your example of [1,2) works in all cases (or lets make it less trivial [1.2.3,4) )...I know it didn't exclude snapshots within that range when I looked at using version ranges several years ago, not sure if it's gotten any better. > resolution of version ranges with non-snapshot bounds can resolve to a > snapshot version > --------------------------------------------------------------------------------------- > > Key: MNG-3092 > URL: https://jira.codehaus.org/browse/MNG-3092 > Project: Maven > Issue Type: Bug > Components: Dependencies > Reporter: Mark Hobson > Assignee: Jason van Zyl > Fix For: 3.2.x > > Attachments: MNG-3092.patch, 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 was sent by Atlassian JIRA (v6.1.6#6162)