Version ranges

Earlier, we have seen an artifact is described by the groupId/artifactId/version triplet. Actually, you can specify not only a version number, but also a range of versions.

The grammatical meaning of the mathematical signs is as follows:

  • Parenthesis signs ( and ) hint an including range
  • Brackets signs [ and ] hint an excluding range
  • Commas separate subsets

The following table explains the grammatical meaning of a few ranges:




Version equals to 1.2 or is starting with 1.2


Version strictly equal to 1.2


Anything less than 1.2, included


Anything less than 1.2, excluded

[1.2, )

Anything greater than 1.2, included


Anything greater than 1.2, excluded


Anything ...

Get Apache Maven Dependency Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.