public URI generateShimJarFile ( ) { try { Set < FileResource > globalFiles = new HashSet <> ( ) ; final File globalFolder = new File ( this . reefFileNames . getGlobalFolderPath ( ) ) ; final File [ ] filesInGlobalFolder = globalFolder . listFiles ( ) ; for ( final File fileEntry : filesInGlobalFolder != null ? filesInGlobalFolder : new File [ ] { } ) { globalFiles . add ( getFileResourceFromFile ( fileEntry , FileType . LIB ) ) ; } File jarFile = this . jobJarMaker . newBuilder ( ) . addGlobalFileSet ( globalFiles ) . build ( ) ; return uploadFile ( jarFile ) ; } catch ( IOException ex ) { LOG . log ( Level . SEVERE , "Failed to build JAR file" , ex ) ; throw new RuntimeException ( ex ) ; } }
A utility method which builds the evaluator shim JAR file and uploads it to Azure Storage .