mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 23:39:13 +00:00
6d0eb5b9bb
* fix(maven): determing properly closed ranges A Maven range like [1,2) contains various (usually pre-release) versions of the 2.x line. By Maven definition the smallest possible 2.x version is 2-alpha, so a properly closed range that only allows 1.x versions would be [1,2-alpha). This is now detected and properly advanced. * fix(maven): normalize both sides of version comparison Without this a leftValue of v3 is incremented to 4 and then compared to v4. * fix(maven): do not loose the v-prefix of versions in range handling If versions of a project always start with a v prefix, this was lost when Maven ranges were involved. The coerce and increment methods stripped the v away and it was never added back in. * Properly fix underlying problem and make PR standalone * Add missing coverage * Remove unused callback parameter
Maven versioning is similar to SemVer but also very different in places. It's specified by Maven itself.
Ranges are supported using Maven's special syntax.
For development purposes, download maven-artifact JAR and run:
$ java -jar maven-artifact-*.jar 3.2.4-alpha-1 3.2.4-SNAPSHOT 3.2.4.0
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 3.2.4-alpha-1 == 3.2.4.alpha.1
3.2.4-alpha-1 < 3.2.4-SNAPSHOT
2. 3.2.4-SNAPSHOT == 3.2.4.snapshot
3.2.4-SNAPSHOT < 3.2.4.0
3. 3.2.4.0 == 3.2.4