I have a parent springboot pom, and several child poms to be integrated. Where I have to keep using the SNAPSHOT version during development in the develop branch. In the release branch, along with the version (0.0.1) I have to append the Build number for each build and finally release to master and develop, with just the release version 0.0.1 and in develop with next SNAPSHOT version.
My plan is to use a simple mvn deploy
in the develop branch, and then use the gitflow-maven-plugin for the release process.
I tried to use the gitflow-maven-plugin to release and it works fine in my local. But on Azure Repo Git, where all this code is residing, I have a strict branch policy for develop and master branch, that does not allow merges except for PRs which have a work item linked and atleast 1 approver. This is causing the goal mvn gitflow:release-finish
to fail.
Though it fails, on my local the versioning is atleast as expected. I have to get past this issue and then use the CI feature of this plugin to make this work.
Has anyone ever faced this issue?
My plugin set up in the pom.xml is as below.
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.15.1</version>
<configuration>
<!-- optional configuration -->
<installProject>false</installProject>
<verbose>true</verbose>
<gitFlowConfig>
<productionBranch>master</productionBranch>
<developmentBranch>develop</developmentBranch>
<origin>origin</origin>
</gitFlowConfig>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.15.1</version>
</plugin>
</plugins>
</build>
question from:
https://stackoverflow.com/questions/65931253/workaround-for-branch-policy-that-prevents-remote-merges-in-gitflow-maven-plugin 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…