aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
490 stars 182 forks source link

versionDigitToIncrement ignored during release #256

Closed beatngu13 closed 3 years ago

beatngu13 commented 3 years ago

Using the following plugin config:

<plugin>
    <groupId>com.amashchenko.maven.plugin</groupId>
    <artifactId>gitflow-maven-plugin</artifactId>
    <version>1.14.0</version>
    <configuration>
        <versionDigitToIncrement>1</versionDigitToIncrement>
    </configuration>
</plugin>

And the following command line:

$ mvn gitflow:release -B -DversionDigitToIncrement=0

The command-line parameter -DversionDigitToIncrement=0 seems to be ignored as the incremented version digit is still 1.

My assumption was that command-line parameters overwrite the plugin configuration, so that the default is 1 but when there is a major release, one can supply the aforementioned parameter?

aleksandr-m commented 3 years ago

For better or worse this is how maven works. See https://issues.apache.org/jira/browse/MNG-4979

beatngu13 commented 3 years ago

Ah, I see. So one could solve this by using a property. Thx for pointing to that issue!