2

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.

wawawa
  • 2,835
  • 6
  • 44
  • 105
  • This isn't a common case covered by this plugin, so I guess it's impossible. But why not just do these changes manually without the plugin? – injecto Jan 20 '20 at 09:48
  • You should never re-use a version number. There should never be two packages with different content and the same version string on them. You are not versioning your packages if you do this, you are lying to your customers. – jwdonahue Jan 30 '20 at 18:07

1 Answers1

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

Ekin T
  • 11
  • 2