Fixed forking ant-task java compilation (eg when doing scala joint compilation) when running from a stand-alone jre installation on windows.
Use JGit instead of the `git` command to determine the current branch and commit id.