For example, I have this maven dependency
<dependency>
<groupId>foo</groupId>
<artefactId>bar</artifactId>
<version>[1.0.0, 1.1.0)</version>
</dependency>
The goal I'm trying to achieve is to include all patch (1.0.x) releases, including SNAPSHOT releases (to facilitate testing and integration), like 1.0.1-SNAPSHOT
, 1.0.2
etc.
However, setting a version range like this [1.0.0, 1.1.0)
will include versions like 1.1.0-alpha
, 1.1.0-beta
and 1.1.0-SNAPSHOT
as well, which is something I don't want.
Is there a better way, short of specifying the version as [1.0.0, 1.1.0-alpha)
, which really just pollutes the POM with ugly versions numbers.
(It is not about trying to use the latest version, but about how to gracefully exclude alpha
, beta
and snapshot
builds in an exclusive version range)