Versions

Last modified by Thomas Mortagne on 2017/07/08 18:33

Extension Manager support a set of syntaxes for versions and versions ranges.

The syntax is mostly based on the Maven one.

RangeMeaning
1.01.0 is best but greater version are matched too.
in Maven it means 1.0 is best but any other version is matched too
(,1.0]x <= 1.0
[1.0]Only 1.0
[1.2,1.3]1.2 <= x <= 1.3
[1.0,2.0)1.0 <= x < 2.0
[1.5,)x >= 1.5
(,1.0],[1.2,)x <= 1.0 or x >= 1.2. Multiple sets are comma-separated
(,1.1),(1.1,)Anything but 1.1

In Java these version are represented by the following public interfaces:

  • org.xwiki.extension.version.Version: provide API to compare versions and indicate if the version is of type SNAPSHOT, BETA or STABLE
  • org.xwiki.extension.version.VersionRange: a single range
  • org.xwiki.extension.version.VersionRangeCollection: several ranges
  • org.xwiki.extension.version.Constraint: a VersionRangeCollection or a Version

This is the default syntax used by Extension Manager but it's each repository handler job to parse it's own syntax and create corresponding Java objects implementing Extension Manager public API.

Get Connected