build-helper-maven-plugin
build-helper-maven-plugin copied to clipboard
Feature request: Add version limits to released-version goal
The released-versions goal can only find the highest released version right now.
I want to be able to use it to release new versions by: Detecting the most recent released version, the minor/incremental version, and call versions:set.
This mostly works, but does not if I have multiple major versions being worked on simultaneously. I need to be able to use it to find the highest minor version given a major version, or highest incremental version given a major version.
For example, if the released versions are 1.2.2, 1.2.3, 1.3, 2.1.
I'd like to be able to identify the latest 2.x release, or the latest 1.2.x release.
I'd propose adding a parameter: -DversionPrefix=1.2, which defaults to the empty string, and if it is set, then released-versions will not select a version does not begin with that prefix.
So for the above available versions, I would expect the following results:
versionPrefix | [propertyPrefix].version |
---|---|
2.1 | |
1 | 1.3 |
1.2 | 1.2.3 |
1.3 | 1.3 |
1.4 | |
2 | 2.1 |
3 | |
0 |