I have come across an issue when building a commit which has multiple tags which are matched by a single ref config. I excepted that the maven-git-versioning-extension would select the newest tag or the highest version number. However, the tag representing the lowest version number was selected.
To illustrate: a commit is tagged with release/3.0.0 and release/3.0.1. When building this commit I expect release 3.0.1 to be built but instead version 3.0.0 is built.
I think the problem is in line 750 in GitVersioningModelProcess, where the list of tags is sorted ascendingly by the comparator defined by DefaultArtifactVersion. Before this sort happens the list of tags is sorted by the order defined in TagComparator (called in line 150 in GitUtil.java). The order defined in TagComparator is the one I expect to be used when selecting the tag for building.
I have come across an issue when building a commit which has multiple tags which are matched by a single ref config. I excepted that the maven-git-versioning-extension would select the newest tag or the highest version number. However, the tag representing the lowest version number was selected.
To illustrate: a commit is tagged with release/3.0.0 and release/3.0.1. When building this commit I expect release 3.0.1 to be built but instead version 3.0.0 is built.
I think the problem is in line 750 in GitVersioningModelProcess, where the list of tags is sorted ascendingly by the comparator defined by
DefaultArtifactVersion
. Before this sort happens the list of tags is sorted by the order defined in TagComparator (called in line 150 in GitUtil.java). The order defined inTagComparator
is the one I expect to be used when selecting the tag for building.