Tag: java

does Java have API wrappers around subversion and Git?

Curious if there any API wrappers for Git and Subversion for Java? I want to be able to pullup the changesets and souce code (and diffs) from Subversion and Git repos. Is this possible? Any pre-built APIs?

How to build Eclipse JDT Core from source code via Git?

I want to build Eclipse JDT Core from source code via Git. Naïvely, I cloned git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git and tried to run mvn validate (the most basic of Maven phases) from the Git master branch but this failed with errors below. I am a Debian Linux user with Maven 3.0.5 and JDK 1.7 installed. I am interested […]

Eclipse or Maven add /target to gitignore

I’m using Maven and Git with a Java EE project (EAR, EJB and WEB), in Eclipse the workspace is rebuilding in loop beacause something adds “/target” to my .gitignore. This is my gitignore : *.class *.settings *.project *.classpath target # Package Files # *.jar *.war *.ear /target /target /target /target /target /target … (more and […]

Create Eclipse Project from Android Git

I’ve downloaded one of the open source Android Applications (the music application) from the Android git, and I’m trying to create a new project from the source. Creating a new project using that existing source doesn’t work giving me an “invalid description error”. Any help?

Arrow up and number on Eclipse meaning

I’m working on a project using Eclipse with Maven and Bitbucket. Right now I can’t do any commit, I mean even if I press the commit button, I can’t see it on Bitbucket. Furthermore, next to my project’s name I got a symbol with an arrow up and the number 2 next to it. What […]

Version numbering / release mechanics with Maven and GitHub

I’m trying to work out the optimal way of managing my workflow to allow version numbering and releases with Maven and Git. Currently my workflow is: Edit pom.xml to indicate a new snapshot version “1.2.3-SNAPSHOT” Commit to git with message “start work on 1.2.3-SNAPSHOT” Do coding work, commit after each successful “mvn test” etc. Once […]

Git doesn't recognize renamed and modified package file

I had a java file called package/old/myfile.java. I had committed this file through git. I then renamed my package to new so my file was in package/new/myfile.java. I now want to commit this file rename (and content changes) to git. When I do git status I get # Changes not staged for commit: # (use […]

JGIT Pull NoHeadException

When is try to execute the following method (uses JGIT library) private void pullRepo() throws IOException,GitAPIException, WrongRepositoryStateException, InvalidConfigurationException, DetachedHeadException, InvalidRemoteException, CanceledException, RefNotFoundException, NoHeadException{ Git git = new Git(localRepo); git.pull().call(); } I get the following runtime exception: org.eclipse.jgit.api.errors.NoHeadException: Pull on repository without HEAD currently not supported at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:161) Does someone know how to solve this? The […]

How to disable git 'Push Results' dialog in eclipse

After a push to upstream git operation the eclipse IDE shows a helpful dialog which provides information about the push operation (shown below). Is there a way to prevent this dialog from popping up?

Heroku Java app crashing locally but not on the web

I have my main class: public class Main { public static void main(String[] args){ Spark.port(getHerokuAssignedPort()); get(“/hello”, (req, res) -> “Hello Heroku World”); } private static int getHerokuAssignedPort() { ProcessBuilder processBuilder = new ProcessBuilder(); if (processBuilder.environment().get(“PORT”) != null) { return Integer.parseInt(processBuilder.environment().get(“PORT”)); } return 4567; //return default port if heroku-port isn’t set (i.e. on localhost) } } […]

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