In my maven project I use dependencies like this:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>[4.2.2, 5.0)</version>
</dependency>
Since the next major version (5.0) may change the API, I want my project to use the latest stable version available for branch 4.x.
This morning bug investigation told me this expression [4.2.2, 5.0) grabs any version available. In my case: 4.3-alpha1.
How to make maven use thelatest release version within version range?