From b36fae43c9c3e384d41384530f53bc8dd93c1f04 Mon Sep 17 00:00:00 2001 From: Emmanuel Bruno <emmanuel.bruno@univ-tln.fr> Date: Thu, 16 Dec 2021 09:27:31 +0100 Subject: [PATCH] adds jgitflow support. --- pom.xml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/pom.xml b/pom.xml index 04296a9..57c1323 100644 --- a/pom.xml +++ b/pom.xml @@ -291,6 +291,86 @@ <version>1.1.0</version> </plugin> + <!-- This plugins implements the gitflow branching model (http://nvie.com/git-model, + https://www.atlassian.com/git/tutorials/comparing-workflows/#!workflow-gitflow ) + for maven. It gives an automatic way to manage versions and branches. + https://bitbucket.org/atlassian/jgit-flow/wiki/Home + mvn jgitflow:feature-start: + creates a new feature branch; pushes the branch to origin automatically (can be shared and + used by jenkins). + mvn jgitflow:feature-finish: + merges the feature branch back into the development branch and pushes to origin. + The good way : + git fetch : make sure your local repo copy is up-to-date + git checkout development : go to development + git merge origin/development : make sure your local develop is up-to-date (origin being the remote's name here) + git checkout <feature-branch> : go to you feature branch again + git merge develop : Merge and solve conflicts, if any (on you feature branch) + mvn jgitflow:feature-finish you already solved the conflicts + mvn jgitflow:release-start: + creates a release branch (freeze to prepare a release, only bugfix, documentation + and translation) and pushes it to origin. + mvn jgitflow:release-finish: + builds, tags and merges the release branch back into master and development; + updates versions in master and development branches + mvn jgitflow:hotfix-start: like mvn jgitflow:release-start but branches off of master + mvn jgitflow:hotfix-finish: like mvn jgitflow:release-finish + We forbid deploy from the workstations, it has to be done by the C.I. server. + --> + <plugin> + <groupId>external.atlassian.jgitflow</groupId> + <artifactId>jgitflow-maven-plugin</artifactId> + <version>1.0-m5.1</version> + <dependencies> + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch</artifactId> + <version>0.1.55</version> + </dependency> + </dependencies> + <configuration> + <!-- Enable this to push to origin using SSH keys --> + <enableSshAgent>true</enableSshAgent> + <!-- Keep your maven submodules at the same version as the parent POM --> + <autoVersionSubmodules>true</autoVersionSubmodules> + <!-- Pushing in-development features to origin allows all devs to see what each other + are working on --> + <!--pushFeatures>true</pushFeatures--> + + <!-- This allows the CI server (e.g. Jenkins) to automatically push new releases to + origin; you can then either manually deploy them or, if you are doing Continuous + Deployments, auto-deploy them to prod --> + <!--pushReleases>true</pushReleases--> + <!--pushHotfixes>true</pushHotfixes--> + + <!-- append the feature name to the version on the feature branch. --> + <enableFeatureVersions>true</enableFeatureVersions> + <!-- Prevents deployments from dev workstations so that they can be done by a CI + server --> + <noDeploy>true</noDeploy> + + <!-- Whether to squash commits into a single commit before merging. --> + <squash>false</squash> + + <scmCommentPrefix>[gitflow]</scmCommentPrefix> + + <!-- A VOIR --> + <featureRebase>true</featureRebase> + + + <!--pullDevelop>true</pullDevelop> + <pullMaster>true</pullMaster--> + + <flowInitContext> + <masterBranchName>master</masterBranchName> + <developBranchName>develop</developBranchName> + <featureBranchPrefix>feature/</featureBranchPrefix> + <releaseBranchPrefix>release/</releaseBranchPrefix> + <hotfixBranchPrefix>hotfix/</hotfixBranchPrefix> + <versionTagPrefix /> + </flowInitContext> + </configuration> + </plugin> </plugins> </pluginManagement> -- GitLab