'How to specify new release version by using gitflow-maven-plugin

I've done some testing with gitflow-maven-plugin, and the version in pom file for master branch is 1.3.1, for develop branch is 1.3.2-SNAPSHOT, I wanted it to be back to 1.0.0(master) and 1.0.1-SNAPSHOT(develop). How can I do this?? How to specify it in the maven command?

I tried to hardcode the version in pom file (develop branch) to 1.0.0-SNAPSHOT and then run the code below:

-B gitflow:release -DnewVersion=1.0.0

but this doesn't work at all, it said 'tag '1.0.0' already exists',but it updated the version to 1.0.0(master) and the version in develop branch is still 1.0.0-SNAPSHOT. Can anyone help me? Also wanted to ask what's the command for incrementing the first (1.0.0-->2.0.0) and second digit (1.0.0-->1.1.0)? The command now can only change the third digit.

I'm new to this, please help me.



Solution 1:[1]

https://aleksandr-m.github.io/gitflow-maven-plugin/release-mojo.html#releaseVersion

Release version to use instead of the default next release version in non interactive mode.

there is also the same for release-start https://aleksandr-m.github.io/gitflow-maven-plugin/release-start-mojo.html#releaseVersion

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ekin T