/** * Create the imports/exports by parsing * * @throws IOException */ void analyzeClasspath() throws Exception { classpathExports = newHashMap(); for (Iterator<Jar> c = getClasspath().iterator(); c.hasNext();) { Jar current = c.next(); checkManifest(current); for (Iterator<String> j = current.getDirectories().keySet().iterator(); j.hasNext();) { String dir = j.next(); Resource resource = current.getResource(dir + "/packageinfo"); if (resource != null) { InputStream in = resource.openInputStream(); try { String version = parsePackageInfo(in); setPackageInfo(dir, VERSION_ATTRIBUTE, version); } finally { in.close(); } } } } }
/** * Create the imports/exports by parsing * * @throws IOException */ void analyzeClasspath() throws IOException { classpathExports = newHashMap(); for (Iterator<Jar> c = getClasspath().iterator(); c.hasNext();) { Jar current = c.next(); checkManifest(current); for (Iterator<String> j = current.getDirectories().keySet() .iterator(); j.hasNext();) { String dir = j.next(); Resource resource = current.getResource(dir + "/packageinfo"); if (resource != null) { InputStream in = resource.openInputStream(); try { String version = parsePackageInfo(in); setPackageInfo(dir, "version", version); } finally { in.close(); } } } } }