Introduction
- Maven-release plugin creates .backup and release.properties files to your working directory which can be committed mistakenly, when they should not be. jgit-flow maven plugin doesn’t create these files or any other file in your working directory.
- Maven-release plugin create two tags.
- Maven-release plugin does a build in the prepare goal and a build in the perform goal causing tests to run 2 times but jgit-flow maven plugin builds project once so tests run only once.
- If something goes wrong during the maven plugin execution, It become very tough to roll it back, on the other hand jgit-flow maven plugin makes all changes into the branch and if you want to roll back just delete that branch.
- jgit-flow maven plugin doesn’t run site-deploy
- jgit-flow maven plugin provides option to turn on/off maven deployment
- jgit-flow maven plugin provides option to turn on/off remote pushes/tagging
- jgit-flow maven plugin keeps the master branch always at latest release version.
How to use Jgit-flow maven Plugin for Release
- Add the following lines in your pom.xml for source code management access
scm:git:
scm:git:git:
- Add these line to resolve the Jgit-flow maven plugin and put the other option that will be required during the build
com.atlassian.maven.plugins
maven-jgitflow-plugin
1.0-m4.3
true
false
true
true
true
true
true
true
master-test
deploy-test
- Maven will resolve the jgitflow plug-in dependency
- In the configuration section, we describe how jgit-flow plug-in will behave.
- pushRelease XML tag to enable and disable jgit-flow from releasing the intermediate branches into the git or not.
- keepBranch XML tag to enable and disable the plug-in for keep the intermediate branch or not.
- noTag XMl tag to enable and disable the plug-in to create the that tag in git.
- allowUntracked XML tag to whether allow untracked file during the checking.
- flowInitContext XML tag is used to override the default and branch name of the jgit-flow plug-in
- In above code snippet, there is only two branches, master from where that code will be pulled and a intermediate branch that will be used by the jgit-flow plug-in. as I have discussed that jgit-flow plug-in uses the branches to keep it records. so development branch will be created by the plug-in that resides in the local not remotely, to track the release version etc.
- To put your your releases into the repository manager add these lines
- Put the following lines into your m2/settings.xml with your repository manager credentials
Above code snippet will perform following steps:
Start Release jgit-flow maven plugin command
Finish Release jgit-flow maven plugin command
For a example I have created a repository in github.com. for testing and two branch master-test and deploy-test. It is assumed that you have configured maven and git your system.
In the deploy-test branch run following command
$ mvn clean -Dmaven.test.skip=true install jgitflow:release-start
This command will take input from you for release version and create a release branch with release/. then it will push this release branch into github repository for temporarily because we are not saving the intermediate branched
Now At the end run this command
$ mvn -Dmaven.test.skip=true jgitflow:release-finish
after finishing this command it will delete release/ from local and remote.
Now you can check the changes in pom file by jgitflow. in the above snapshot, it is master-test branch, you can see in the tag it has removed the snapshot and also increased the version. It hold the current version of the application.
And in the deploy-test branch it show you new branch on which developers are working on




great
LikeLike
This comment has been removed by the author.
LikeLike
Inside previously mentioned program code snippet, there is certainly simply a couple of divisions, learn coming from in which in which program code will probably be taken plus a more Devops As a Service advanced part which will be employed by the particular jgit-flow plug-in. as i have got reviewed in which jgit-flow plug-in makes use of the particular divisions to help keep that data.
LikeLike
Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.Advanced AWS Training in Bangalore | Best Amazon Web Services Training Institute in Bangalore Advanced AWS Training Institute in Pune | Best Amazon Web Services Training Institute in PuneAdvanced AWS Online Training Institute in india | Best Online AWS Certification Course in india AWS training in bangalore | Best aws training in bangalore
LikeLike
Thankyou for sharing this information. Microsoft Azure DevOps Training
LikeLike
Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's. microsoft azure training in bangalore rpa training in bangalore best rpa training in bangalorerpa online training
LikeLike
Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.Best Devops training in sholinganallurDevops training in velacheryDevops training in annanagarDevops training in tambaram
LikeLike
I am so proud of you and your efforts and work make me realize that anything can be done with patience and sincerity. Well I am here to say that your work has inspired me without a doubt.python Course in Pune python Course institute in Chennai python Training institute in Bangalore
LikeLike
you do not need scm tags
LikeLike
I have follow all the step but getting below exception….Can you please suggest.[ERROR] Caught exception in FS.readPipe()java.io.IOException: Cannot run program \”bash\” (in directory \”P:\\\”): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at org.eclipse.jgit.util.FS.readPipe(FS.java:431) at org.eclipse.jgit.util.FS_Win32.discoverGitPrefix(FS_Win32.java:113) at org.eclipse.jgit.util.FS.gitPrefix(FS.java:517) at org.eclipse.jgit.util.SystemReader$Default.openSystemConfig(SystemReader.java:92) at org.eclipse.jgit.internal.storage.file.FileRepository.(FileRepository.java:171) at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:577) at org.eclipse.jgit.api.Git.open(Git.java:113) at org.eclipse.jgit.api.Git.open(Git.java:97) at com.atlassian.jgitflow.core.JGitFlowInitCommand.getOrInitGit(JGitFlowInitCommand.java:456) at com.atlassian.jgitflow.core.JGitFlowInitCommand.call(JGitFlowInitCommand.java:112) at com.atlassian.maven.plugins.jgitflow.provider.DefaultJGitFlowProvider.gitFlow(DefaultJGitFlowProvider.java:32) at com.atlassian.maven.plugins.jgitflow.manager.AbstractFlowReleaseManager.runPreflight(AbstractFlowReleaseManager.java:67) at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowFeatureManager.getStartLabelAndRunPreflight(DefaultFlowFeatureManager.java:233) at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowFeatureManager.start(DefaultFlowFeatureManager.java:62) at com.atlassian.maven.plugins.jgitflow.mojo.FeatureStartMojo.execute(FeatureStartMojo.java:74) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:47)Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(ProcessImpl.java:386) at java.lang.ProcessImpl.start(ProcessImpl.java:137) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) … 39 more
LikeLike
I am glad that I have visited your blog, really amazing. Waiting for further updates. RPA Training in Chennai RPA course in Chennai RPA Training Institute in Chennai Blue Prism Training in Chennai Blue Prism Training Institute in Chennai UiPath Training in Chennai RPA Training in Tambaram RPA course in Chennai
LikeLike
Excellent post gained so much of information, Keep posting like this. Aviation Courses in Chennai Air hostess training in Chennai Airline Courses in Chennai airport ground staff training courses in Chennai Aviation Academy in Chennai air hostess training in Chennai airport management courses in Chennai ground staff training in Chennai
LikeLike