Tag: java

Advantages of using public maven repository for libraries instead of local

What are the advantages of using Maven’s public repository vs storing your libraries locally? I see the following disadvantages in using public repository: If for some reason some library is updated my application will probably crash, considering I use hundreds of libraries that’s bound to happen sometime. If a specific library version is specified to […]

Configuring known_hosts in jgit

Using jgit with gitolite for source control, I have an application that generates certain code on command and which we want to be committed to source control. The goal is to pull with a fast forward, commit the new code, and then push it. I have the following method: private void commitToGitRepository(String updateComment, Config config) […]

Upload maven pom.xml to Git repository?

I want to publish my Java project on GitHub. I’m not sure if I should upload my pom.xml from Maven in my repository. I’m using Eclipse without eGit. On the one hand: the pom.xml is necessary to know which libraries I used. On the other hand: it’s a configuration file which maybe shouldn’t made public. […]

jGit using RevWalk to get RevCommit returns nothing

I’m newbie on jGit and Git. I’m trying to query the historic of commit of a git repository, but I would like to get only the commit of a specific user. Reading the docs I saw that RevWalk will allow me to add RevFilters in orther to limit the search. First, I use a Git […]

Can I use git in local area network?

I want to use EGit in a small eclipse project with my colleagues, but we don’t want to Submit the project to the github.com. What I should do with the next picture ? The ip address is 192.168.16.40 and the project is in D:\EclipseProjects\ForwardA.git. How I should fill the URI,Host,Repository Path ? Is the Authentiacation […]

Can I somehow alias R in Android?

I have two Android applications that share 90% of their code with each other, and due to political reasons (I think also technical reasons) need to have separate package names (so they’ll appear under different URLs in Google Play) I use git with two branches for each app, and I sync the two branches manually […]

Git: maintain 2 branches with 99% of similar code

I’m working on a Java project with Maven, where I need to deploy very often to two different weblogic environments. The only differences between these 2 deployments are a bunch of changes in these 2 files: pom.xml and weblogic.xml files. The rest of the files are the same. We’re creating 2 GIT branches for this: […]

Modular Maven projects and multiple Git repositories

I have separated the code that I have been making up to this point from a single maven project to multiple maven projects. The projects that I have ended up with can be used by future projects, they are pretty much libraries. I have been using a single Git repository up to this point since […]

How can I organise my project's codebase that targets multiple library versions

I’m writing a small library L1 that depends on a third party library L2. L2 has multiple versions that L1 needs to be able to support. Each version of L2 is bound to a given specific API and target JDK. I have no control over L2. For instance : L2-v1.x -> I need to be […]

How to run all modified JUnit test classes?

I have an IntelliJ project, versioned in git. How can I run all JUnit test classes, that I have modified since my last commit?

Git Baby is a git and github fan, let's start git clone.