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
493 stars 181 forks source link

Hotfix-finish doesn't increment snapshot version #211

Closed vkuragin closed 4 years ago

vkuragin commented 4 years ago
  1. Created new hotfix with version 1.0.6
  2. Executing hotfix-finish for this hotfix:

mvn -DpushRemote=false -B -DhotfixVersion=1.0.6 gitflow:hotfix-finish

  1. Output:

[INFO] Checking for uncommitted changes. [INFO] Fetching remote branch 'origin hotfix/1.0.6'. [INFO] Comparing local branch 'hotfix/1.0.6' with remote 'origin/hotfix/1.0.6'. [INFO] Fetching remote branch 'origin dev'. [INFO] Comparing local branch 'dev' with remote 'origin/dev'. [INFO] Fetching remote branch 'origin master'. [INFO] Comparing local branch 'master' with remote 'origin/master'. [INFO] Checking out 'hotfix/1.0.6' branch. [INFO] Cleaning and testing the project. [INFO] Checking out 'master' branch. [INFO] Merging (--no-ff) 'hotfix/1.0.6' branch. [INFO] Creating '1.0.6' tag. [INFO] Checking out 'dev' branch. [INFO] Updating version(s) to '1.0.6'. [INFO] Committing changes. [INFO] Merging (--no-ff) 'hotfix/1.0.6' branch. [INFO] Updating version(s) to '1.0.6-SNAPSHOT'. [INFO] Committing changes. [INFO] Deleting 'hotfix/1.0.6' branch.

  1. Expected: 1.0.7-SNAPSHOT, actual: 1.0.6-SNAPSHOT
aleksandr-m commented 4 years ago

Seems that it has been broken since #87. Thanks!

bpnrd commented 4 years ago

Hi Team,

I am trying to execute the release start goal but i am getting the below error message. Please help me to recover this issue.

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.984 s [INFO] Finished at: 2020-04-24T17:46:01+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'gitflow' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Shivansh.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

C:\Users\Shivansh\Downloads\gitflow-maven-plugin-master\gitflow-maven-plugin-master>mvn -B gitflow:release-start gitflow:release-finish [INFO] Scanning for projects... [WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available [WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 13 kB/s) [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 18 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.923 s [INFO] Finished at: 2020-04-24T17:48:11+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'gitflow' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Shivansh.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

aleksandr-m commented 3 years ago

@vk23 1.15.0 is out!

mumbar commented 3 years ago

@aleksandr-m I don't get this fix. The previous behavior in 1.14.0 was correct in my opinion. Why increment the version when merging hotfix back to dev? Should not it stay the same? And still if you do increment, where exactly do I specify the digit (2 in this case) to increment? versionDigitToIncrement passed to hotfix-finish makes no effect.

mzatko commented 3 years ago

@aleksandr-m , @mumbar, @vkuragin I was just about to open a bug because of this strange behavior introduced in 1.15.0 Why would we want to increment snapshot version when merging hotfix? It is different scenario so I open new issue