Versioning for scala

Similar to accessing pre release packages in Python, Apache uses Ivy package manager for resolving project dependencies.

Scala also supports version matchers for its packages, below are few options available.

Below details are referenced from here: version-matchers | Apache Ivy™

1. Exact Revision Matcher - As the name suggests, its usage of the exact version as dependency.

2. Sub Revision Matcher.

3. Latest (Status) Matcher - Ivy supports three statuses: release, milestone and integration. These statuses needs to be declared in the ivy settings file.

4. Version Range Matcher.

5. Version Pattern Matcher - This needs version matcher declaration changes to be included in ivy settings, so we will not be looking at this solution.


Further details on - Sub Revision Matcher and Version Range Matcher

Sub Revision Matcher:

This matches all the versions starting with a specific prefix. + is used along with prefix to match the available versions.

Revision

Matches

1.0.+

all revisions starting with '1.0.', like 1.0.1, 1.0.5, 1.0.a

1.1+

all revisions starting with '1.1', like 1.1, 1.1.5, but also 1.10, 1.11

Version Range Matcher:

As the name suggests developers can specify range of versions to be resolved.

Revision

Matches

(,2.0[

all versions lower than 2.0

(,2.0]

all versions lower or equal to 2.0

[1.0,)

all versions greater or equal to 1.0

[1.0,2.0[

all versions greater or equal to 1.0 and lower than 2.0

[1.0,2.0]

all versions greater or equal to 1.0 and lower or equal to 2.0

]1.0,)

all versions greater than 1.0

]1.0,2.0[

all versions greater than 1.0 and lower than 2.0

]1.0,2.0]

all versions greater than 1.0 and lower or equal to 2.0

Post a Comment

0 Comments