protected Collection < File > extractDependentLibs ( final File cachedir ) throws IOException { final Attributes attributes = getMainAttributes ( ) ; if ( null == attributes ) { debug ( "no manifest attributes" ) ; return null ; } final ArrayList < File > files = new ArrayList < File > ( ) ; final String libs = attributes . getValue ( RUNDECK_PLUGIN_LIBS ) ; if ( null != libs ) { debug ( "jar libs listed: " + libs + " for file: " + pluginJar ) ; if ( ! cachedir . isDirectory ( ) ) { if ( ! cachedir . mkdirs ( ) ) { debug ( "Failed to create cachedJar dir for dependent libs: " + cachedir ) ; } } final String [ ] libsarr = libs . split ( " " ) ; extractJarContents ( libsarr , cachedir ) ; for ( final String s : libsarr ) { File libFile = new File ( cachedir , s ) ; libFile . deleteOnExit ( ) ; files . add ( libFile ) ; } } else { debug ( "no jar libs listed in manifest: " + pluginJar ) ; } return files ; }
Extract the dependent libs and return the extracted jar files