Skip to content
mkristian edited this page Sep 20, 2012 · 4 revisions

version conversions

mapping from rubygems like versions to maven version ranges. the maven version ranges uses following interval:

  • ( is start boundary excluding the boundery
  • [ is start boundary including the boundery
  • ) is end boundary excluding the boundery
  • ] is end boundary including the boundery

the conversion leaves maven version ranges as they are, i.e. the conversion is idempotent.

ruby maven
-- empty -- [0,)
!2.3.4 (2.3.4,)
=2.3.4 [2.3.4,2.3.4.0.0.0.0.1)
~>1.8.2 [1.8.2,1.8.99999]
~>1.8 [1.8,1.99999]
>1.2 (1.2,)
<1.2 [0,1.2)
>=1.2 [1.2,)
<=1.2 [0,1.2]
>=1.2, <2.0 [1.2,2.0)
>=1.2, <=2.0 [1.2,2.0]
>1.2, <2.0 (1.2,2.0)
>1.2, <=2.0 (1.2,2.0]
Clone this wiki locally