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.
First of all, thank you for this great plugin! Unfortunately, I encounter an issue in my project sample when i want to close a hotfix automatically using Jenkins pipelines.
My plugin's configuration is the following:
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.19.0</version>
<configuration>
<gitFlowConfig>
<productionBranch>main</productionBranch>
<developmentBranch>develop</developmentBranch>
<featureBranchPrefix>feature/</featureBranchPrefix>
<releaseBranchPrefix>release/</releaseBranchPrefix>
<hotfixBranchPrefix>hotfix/</hotfixBranchPrefix>
<supportBranchPrefix>support/</supportBranchPrefix>
<versionTagPrefix>v-</versionTagPrefix>
<origin>origin</origin>
</gitFlowConfig>
<mvnExecutable>./mvnw</mvnExecutable>
<fetchRemote>true</fetchRemote>
<pushRemote>true</pushRemote>
<versionDigitToIncrement>1</versionDigitToIncrement>
<commitMessages>
<releaseStartMessage>Bump version to @{version}</releaseStartMessage>
<releaseFinishMessage>Bump version to @{version}</releaseFinishMessage>
<hotfixStartMessage>Bump version to @{version}</hotfixStartMessage>
<hotfixFinishMessage>Bump version to @{version}</hotfixFinishMessage>
<tagReleaseMessage>Create tag @{version}</tagReleaseMessage>
</commitMessages>
</configuration>
</plugin>
I can create a hotfix using the same way (by Jenkins so). The plugin creates correctly the branch as expected but for a reason I don't understand the goal hotfix-finish is failing.
My case is the following: when the hotfix is discovered by Jenkins, I executed the stage i wrote to finish the hotfix using this command line:
The following error is generated by the plugin:
[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.19.0:hotfix-finish (default-cli) on project gitflow: hotfix-finish: Hotfix branch with name 'hotfix/1.26.1' doesn't exist. Cannot finish hotfix. -> [Help 1]
I don't understand why i get this error because the hotfix branch exists:
Hello,
First of all, thank you for this great plugin! Unfortunately, I encounter an issue in my project sample when i want to close a hotfix automatically using Jenkins pipelines. My plugin's configuration is the following:
I can create a hotfix using the same way (by Jenkins so). The plugin creates correctly the branch as expected but for a reason I don't understand the goal hotfix-finish is failing.
My case is the following: when the hotfix is discovered by Jenkins, I executed the stage i wrote to finish the hotfix using this command line:
script { POM_VERSION = readMavenPom().getVersion() } withMaven(maven: MAVEN_VERSION, mavenSettingsConfig: 'artifactory-settings-api') { sh(label: "Finish hotfix", script: "./mvnw -B -DhotfixVersion=${POM_VERSION} gitflow:hotfix-finish") }
The following error is generated by the plugin: [ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.19.0:hotfix-finish (default-cli) on project gitflow: hotfix-finish: Hotfix branch with name 'hotfix/1.26.1' doesn't exist. Cannot finish hotfix. -> [Help 1]
I don't understand why i get this error because the hotfix branch exists:![image](https://user-images.githubusercontent.com/10142637/222692679-e660e696-7aad-42cf-8a0d-cef92193c639.png)
Could you help me ?
Thank you in advance!