File cloneProject ( URI projectUri ) { try { log . info ( "Cloning repo from [" + projectUri + "] to [" + this . basedir + "]" ) ; Git git = cloneToBasedir ( projectUri , this . basedir ) ; if ( git != null ) { git . close ( ) ; } File clonedRepo = git . getRepository ( ) . getWorkTree ( ) ; log . info ( "Cloned repo to [" + clonedRepo + "]" ) ; return clonedRepo ; } catch ( Exception e ) { throw new IllegalStateException ( "Exception occurred while cloning repo" , e ) ; } }
Clones the project .