Tag: java

Spring cloud config organising files in folders

I’m trying to organise a set of config files in folders within my Git repo. I read in the Spring Cloud Docs this can be done this way: The HTTP service has resources in the form: /{application}/{profile}[/{label}] /{application}-{profile}.yml /{label}/{application}-{profile}.yml /{application}-{profile}.properties /{label}/{application}-{profile}.properties So I created my config structure following the first pattern: app1/uat/application.yml But the Config […]

Can't push to bitbucket from eclipse neon

When I’m trying to commit and push a rep in bitbucket from Eclipse Neon I get this message: When I push using command line it works perfectly! I tried to go to: eclipse/myeclipse > menu window > preferences > general > security > content > click “delete” > ok and then I re-entered my credentials […]

Git doesn't commit a file in eclipse

I have a web project in Eclipse Neon. I’ve made some changes in a Java file, after commit+pull+push actions that controller file was removed from the other persons working on that Git group. I’ve tried to delete and recreate that file, but when I try to commit git won’t commit that file. Also the icon […]

JGit checkout previous commit

How to tell JGit to checkout its parent? For example, if I have a situation like the one below on the master branch: c815b27 newestCommit (HEAD -> master, origin/master, master) e46dcaf previousCommit b2d6867 previousPreviousCommit I would like to call a command from JGit that would look something like: git.checkout().setName(“c815b27~”).call(); and would result in the state […]

In Java, how can I make a thread-safe application which reuses Git repositories?

I have an open source web application where the same repository on disk can be used by multiple threads. This involves doing git checkout to a new branch and accessing files from within the repository. There are a few issues with this: Git uses pessimistic concurrency control for operations, using a lock file in the […]

How can I create a git hook that forces me to write javadoc comments?

Is there a way for me to somehow parse my java code files and look for java doc comments? I want to make sure I’ve written javadocs for the class and each method of the class (or everything really). Is this possible?

How to reference TFS work item when committing from Eclipse EGit or from git command line?

With the latest TFS Server and Eclipse with TEE plugin (Team Explorer Everywhere) how to reference TFS work item when committing from within Eclipse? We would like to gradually switch from TFVS to Git, that is supported in TFS now. But in Eclipse Commit dialog, there’s no way select work item. I guess it should […]

Error connecting to GitLab with JGit

I am trying to use JGit to read some tags from a repository on GitLab. I can clone the repository in bash, so I know that I have permissions and so on. When I try to fetch the tags using JGit, I get the following error: UnknownHostKey: gitlab.com. RSA key fingerprint is b6:03:0e:39:97:9e:d0:e7:24:ce:a3:77:3e:01:42:01 at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:160) […]

Maven Deployment Parameters in pom.xml

I have a Maven project which should deploy their compiled files in another folder. Currently, i am doing this by specifying the parameter altDeploymentRepository: mvn -DaltDeploymentRepository=snapshot-repo::default::file:/home/user/some/folder/mvn-repo/snapshots deploy My question: Is it possible to do a simple mvn deploy instead and move the parameter declaration to the pom.xml instead? If yes, how? Update I get asked […]

Application rebrands – when should a branching strategy be employed?

Note: In case it matters, we are using git, (so branching and merging is a breeze), and this is an Android application (Java – so conditional compilation is not really applicable). Similar to this question here, but what if you have more than just UI differences between different rebrands of a single version of your […]

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