@Override
  public void init() {
    LOG.info("Initializing " + GitConfigurationSource.class + " pointing to " + repositoryURI);

    try {
      clonedRepoPath = Files.createTempDirectory(tmpPath, tmpRepoPrefix);
      // This folder can't exist or JGit will throw NPE on clone
      Files.delete(clonedRepoPath);
    } catch (IOException e) {
      throw new IllegalStateException("Unable to create local clone directory: " + tmpRepoPrefix, e);
    }

    try {
      clonedRepo = Git.cloneRepository()
          .setURI(repositoryURI)
          .setDirectory(clonedRepoPath.toFile())
          .call();
    } catch (GitAPIException e) {
      throw new SourceCommunicationException("Unable to clone repository: " + repositoryURI, e);
    }

    initialized = true;
  }
@ Override public void init ( ) { LOG . info ( "Initializing " + GitConfigurationSource . class + " pointing to " + repositoryURI ) ; try { clonedRepoPath = Files . createTempDirectory ( tmpPath , tmpRepoPrefix ) ; Files . delete ( clonedRepoPath ) ; } catch ( IOException e ) { throw new IllegalStateException ( "Unable to create local clone directory: " + tmpRepoPrefix , e ) ; } try { clonedRepo = Git . cloneRepository ( ) . setURI ( repositoryURI ) . setDirectory ( clonedRepoPath . toFile ( ) ) . call ( ) ; } catch ( GitAPIException e ) { throw new SourceCommunicationException ( "Unable to clone repository: " + repositoryURI , e ) ; } initialized = true ; }
@throws IllegalStateException        when unable to create directories for local repo clone
@throws SourceCommunicationException when unable to clone repository