Version ranges are a core Maven feature, the versions plugin does not do anything special with version ranges. If you want changes to version ranges you need to petition to have those picked up in core.

At the end of the day, if you use version ranges in your <dependency>s you actually put a whole world of pain on your build (you just don't know it yet). They were a good idea that didn't work.

There are people who think it does work... they are sadly wrong! A pom format change is probably required, so that you could have something like

<dependency>
  <groupId>org.manchu.foo</groupId>
  <artifactId>foobar</artifactId>
  <version>1.2</version>
  <range>[1.0,1.1),[1.2,2.0)</range>
</dependency>

IOW you are saying build with 1.2, but the allowed versions are [1.0-1.1)+[1.2-2.0)

Now the real problem here is that we have no way of knowing what versioning scheme the org.manchu.foo people or using, nor do we have a way of knowing that they even followed that scheme for the foobar artifact.

RPMs have a concept known as epoch, which is a strict integer that starts with 1 and is incremented every time the version numbering scheme changes. Without some way to specify an epoch then in essence version ranges are unworkable.

Maven 2.x uses the fixed scheme major.minor.patch-build
Maven 3.x uses the 'meteor' style scheme

where either cannot match the version number to their scheme then versions are compared as strings.

It would be great if we could enforce everyone to use semantic versioning... in my view we need a pom format change to handle that...

then you could have some new version range syntax and version number syntax... so you then get e.g. <version epoch="1">1.3.4</version> and version ranges would be something like 0:[20130105.125407,20130330.162359),1:[1.3.4,1.4.0) All existing 4.0.0 poms would have epoch 0 (i.e. the default if you didn't specify an epoch) and we'd probably have to have some other metadata that allowed defining the sorting rules for each epoch.

But once you realize that at build time you don't actually want version ranges then the whole thing becomes moot anyway

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to