Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

On this page I am trying to capture different designs, problems and solutions around Version Range processing in Mercury project. Please also read the dev@ list discussion on the subject: http://www.mail-archive.com/search?q=mercury+version+range&l=dev%40maven.apache.orgImage Removed

...

Design

Mercury uses a standard OSGi definition of a version range, defined in OSGi core specs 4.1,
page 39 in April-2007 PDF available on OSGi site - http://osgi.orgImage Removed.

The gist of it is:

...

  • \[1.2.3, 4.5.6) 1.2.3 <= x < 4.5.6unmigrated-wiki-markup
  • \[1.2.3, 4.5.6\] 1.2.3 <= x <= 4.5.6
  • (1.2.3, 4.5.6) 1.2.3 < x < 4.5.6
  • (1.2.3, 4.5.6] 1.2.3 < x <= 4.5.6
  • 1.2.3 1.2.3 <= x
unmigrated-wiki-markup
Note

Please note, that multi-range definition, like *<version>\[1,3),(3,8\]</version>* is gone.

Dependency Builder flow

Dependency Builder component of Mercury is responsible for

...

Code Block
titleMaven version lineup
1.2, 1.3-SNAPSHOT, 1.3-alpha-1, 1.3-alpha-2, 1.3-beta-1, 1.3

...

Question to answer: what constitutes the *range \ [1.2,1.3)* and how flexible this implementation should be?
Various options:

  1. 1.2, 1.3-SNAPSHOT, 1.3-alpha-1, 1.3-alpha-2, 1.3-beta-1
  2. 1.2, 1.3-alpha-1, 1.3-alpha-2, 1.3-beta-1
  3. 1.2

...

Welcome to the debate (smile) I say that a version range should only
resolve to a snapshot if it is included as an explicit boundary. See http://jira.codehaus.org/browse/MNG-3092Image Removed

You may also be interested in the other issues on my hit list for
being able to use version ranges in Maven: http://jira.codehaus.org/browse/MNG-2994Image Removedhttp://jira.codehaus.org/browse/MRELEASE-262Image Removedhttp://jira.codehaus.org/browse/MRELEASE-318Image Removed

...

Alternative options

...

To be well rounded we should consider other approaches to dependencies

its worth having a look at how gentoo does versioning with ranges and slots... http://www.gentoo.org/Image Removedhttp://devmanual.gentoo.org/general-concepts/dependencies/index.htmlImage Removedhttp://devmanual.gentoo.org/general-concepts/slotting/index.htmlImage Removed

...

Use Cases

Stephen Connolly wrote:

...