Run Git Commands from Java Applications

Tuesday, January 30, 2018

A few days ago I came across the following question: "how to execute git commands from a java application". After a little research I found a library called JGit which fulfilled my expectations. In this post I will explain how to use this library to execute the basic commands.   To import the library, add the following dependency to your pom file: <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit</artifactId> <version>4.10.0.201712302008-r</version> </dependency>   Then you will be able to import and use the JGit classes import org.eclipse.jgit.*;   To clone a repository you can use the following method: public...
no comments

Publish a Plugin in Jenkins Site

Wednesday, January 25, 2017

Being an open source project might think that would be enough with a couple of clicks to upload your plugin to Jenkins but nothing is further from reality. To publish a plugin in Jenkins site we must go through a series of steps that are not entirely intuitive to people who are not related to development tools like Jira and GitHub.   Step 1: Create a GitHub Account (or use an existent account) 1) Go to https://github.com/ and click “Sign Up” 2) Fill the form and click “Create Account”   Step 2: Create a GitHub Repository (must be public) to store your plugin source code 1) Sign In...