protected File createCachedJar ( final File dir , final String jarName ) throws PluginException { File cachedJar ; try { cachedJar = new File ( dir , jarName ) ; cachedJar . deleteOnExit ( ) ; FileUtils . fileCopy ( pluginJar , cachedJar , true ) ; } catch ( IOException e ) { throw new PluginException ( e ) ; } return cachedJar ; }
Creates a single cached version of the pluginJar located within pluginJarCacheDirectory deleting all existing versions of pluginJar