public File cloneRepository ( ) { String scmTempFolder = new FilesUtils ( ) . createTmpFolder ( false , TempFolders . UNIQUE_SCM_TEMP_FOLDER ) ; cloneDirectory = new File ( scmTempFolder , getType ( ) . toString ( ) . toLowerCase ( ) + Constants . UNDERSCORE + getUrlName ( ) + Constants . UNDERSCORE + getBranch ( ) ) ; FilesUtils . deleteDirectory ( cloneDirectory ) ; // delete just in case it's not empty logger . info ( "Cloning repository {} ...this may take a few minutes" , getUrl ( ) ) ; File branchDirectory = cloneRepository ( cloneDirectory ) ; return branchDirectory ; }
Clones the given repository .