mojohaus / build-helper-maven-plugin

Build Helper Maven Plugin
https://www.mojohaus.org/build-helper-maven-plugin/
MIT License
113 stars 82 forks source link

nextBuildNumber #194

Open desbond opened 9 months ago

desbond commented 9 months ago

mvn clean build-helper:parse-version versions:set -DnewVersion=${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${parsedVersion.nextBuildNumber} -DgenerateBackupPoms=false -DprocessAllModules -DgenerateBackupPoms=false This always leaves the buildNumber as is instead of incrementing [INFO] --- build-helper:3.5.0:parse-version (default-cli) @ test --- [INFO] Processing change of com.test:test:58.59.0.1 -> 58.59.0.1

desbond commented 9 months ago

nextBuildNumber always 1

desbond commented 9 months ago

Does the build have to come with a '-' ?

slawekjaranowski commented 5 months ago

@desbond what is output in your project for:

mvn build-helper:parse-version -X

you should see lines like:

[DEBUG] Parsed Version
[DEBUG]          major: 3
[DEBUG]          minor: 5
[DEBUG]    incremental: 1
[DEBUG]    buildnumber: 0
[DEBUG]      qualifier: SNAPSHOT
[DEBUG] define property parsedVersion.majorVersion = "3"
[DEBUG] define property parsedVersion.minorVersion = "5"
[DEBUG] define property parsedVersion.incrementalVersion = "1"
[DEBUG] define property parsedVersion.buildNumber = "0"
[DEBUG] define property parsedVersion.nextMajorVersion = "4"
[DEBUG] define property parsedVersion.nextMinorVersion = "6"
[DEBUG] define property parsedVersion.nextIncrementalVersion = "2"
[DEBUG] define property parsedVersion.nextBuildNumber = "1"
[DEBUG] define property formattedVersion.majorVersion = "03"
[DEBUG] define property formattedVersion.minorVersion = "05"
[DEBUG] define property formattedVersion.incrementalVersion = "01"
[DEBUG] define property formattedVersion.buildNumber = "00"
[DEBUG] define property formattedVersion.nextMajorVersion = "04"
[DEBUG] define property formattedVersion.nextMinorVersion = "06"
[DEBUG] define property formattedVersion.nextIncrementalVersion = "02"
[DEBUG] define property formattedVersion.nextBuildNumber = "01"
[DEBUG] define property parsedVersion.qualifier = "SNAPSHOT"
[DEBUG] define property parsedVersion.qualifier? = "-SNAPSHOT"
[DEBUG] define property parsedVersion.osgiVersion = "3.5.1.SNAPSHOT"