public void stripSignatures() { Map<String, Resource> map = getDirectories().get("META-INF"); if (map != null) { for (String file : new HashSet<>(map.keySet())) { if (SIGNER_FILES_P.matcher(file) .matches()) remove(file); } } }
public void stripSignatures() { Map<String, Resource> map = getDirectories().get("META-INF"); if (map != null) { for (String file : new HashSet<>(map.keySet())) { if (SIGNER_FILES_P.matcher(file) .matches()) remove(file); } } }
public void copy(Jar srce, String path, boolean overwrite) { check(); addDirectory(srce.getDirectories() .get(path), overwrite); }
public void copy(Jar srce, String path, boolean overwrite) { check(); addDirectory(srce.getDirectories() .get(path), overwrite); }
/** * Get the exporter of a package ... */ public String _exporters(String args[]) throws Exception { Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package", null, 2, 2); StringBuilder sb = new StringBuilder(); String del = ""; String pack = args[1].replace('.', '/'); for (Jar jar : classpath) { if (jar.getDirectories().containsKey(pack)) { sb.append(del); sb.append(jar.getName()); } } return sb.toString(); }
/** * Get the exporter of a package ... */ public String _exporters(String args[]) throws Exception { Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package", null, 2, 2); StringBuilder sb = new StringBuilder(); String del = ""; String pack = args[1].replace('.', '/'); for (Jar jar : classpath) { if (jar.getDirectories().containsKey(pack)) { sb.append(del); sb.append(jar.getName()); } } return sb.toString(); }
/** * Get the exporter of a package ... */ public String _exporters(String args[]) throws Exception { Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package", null, 2, 2); StringBuilder sb = new StringBuilder(); String del = ""; String pack = args[1].replace('.', '/'); for (Jar jar : classpath) { if (jar.getDirectories().containsKey(pack)) { sb.append(del); sb.append(jar.getName()); } } return sb.toString(); }
/** * Get the exporter of a package ... */ public String _exporters(String args[]) throws Exception { Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package", null, 2, 2); StringBuilder sb = new StringBuilder(); String del = ""; String pack = args[1].replace('.', '/'); for (Jar jar : classpath) { if (jar.getDirectories() .containsKey(pack)) { sb.append(del); sb.append(jar.getName()); } } return sb.toString(); }
/** * Get the exporter of a package ... */ public String _exporters(String args[]) throws Exception { Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package", null, 2, 2); StringBuilder sb = new StringBuilder(); String del = ""; String pack = args[1].replace('.', '/'); for (Jar jar : classpath) { if (jar.getDirectories() .containsKey(pack)) { sb.append(del); sb.append(jar.getName()); } } return sb.toString(); }
public void copy(Jar srce, String path, boolean overwrite) { check(); addDirectory(srce.getDirectories().get(path), overwrite); }
public void copy(Jar srce, String path, boolean overwrite) { check(); addDirectory(srce.getDirectories().get(path), overwrite); }
public void copy(Jar srce, String path, boolean overwrite) { check(); addDirectory(srce.getDirectories().get(path), overwrite); }
public boolean analyzeJar(Analyzer analyzer) throws Exception { Jar jar = analyzer.getJar(); Map<String,Resource> dir = jar.getDirectories().get(root); if (dir == null || dir.isEmpty()) { Resource resource = jar.getResource(root); if (resource != null) process(analyzer, root, resource); return false; } for (Iterator<Map.Entry<String,Resource>> i = dir.entrySet().iterator(); i.hasNext();) { Map.Entry<String,Resource> entry = i.next(); String path = entry.getKey(); Resource resource = entry.getValue(); if (paths.matcher(path).matches()) { process(analyzer, path, resource); } } return false; }
public boolean analyzeJar(Analyzer analyzer) throws Exception { Jar jar = analyzer.getJar(); Map<String,Resource> dir = jar.getDirectories().get(root); if (dir == null || dir.isEmpty()) { Resource resource = jar.getResource(root); if (resource != null) process(analyzer, root, resource); return false; } for (Iterator<Map.Entry<String,Resource>> i = dir.entrySet().iterator(); i.hasNext();) { Map.Entry<String,Resource> entry = i.next(); String path = entry.getKey(); Resource resource = entry.getValue(); if (paths.matcher(path).matches()) { process(analyzer, path, resource); } } return false; }
public boolean analyzeJar(Analyzer analyzer) throws Exception { Jar jar = analyzer.getJar(); Map<String,Resource> dir = jar.getDirectories().get(root); if (dir == null || dir.isEmpty()) { Resource resource = jar.getResource(root); if (resource != null) process(analyzer, root, resource); return false; } for (Iterator<Map.Entry<String,Resource>> i = dir.entrySet().iterator(); i.hasNext();) { Map.Entry<String,Resource> entry = i.next(); String path = entry.getKey(); Resource resource = entry.getValue(); if (paths.matcher(path).matches()) { process(analyzer, path, resource); } } return false; }
public boolean analyzeJar(Analyzer analyzer) throws Exception { Jar jar = analyzer.getJar(); Map<String, Resource> dir = jar.getDirectories() .get(root); if (dir == null || dir.isEmpty()) { Resource resource = jar.getResource(root); if (resource != null) process(analyzer, root, resource); return false; } for (Iterator<Map.Entry<String, Resource>> i = dir.entrySet() .iterator(); i.hasNext();) { Map.Entry<String, Resource> entry = i.next(); String path = entry.getKey(); Resource resource = entry.getValue(); if (paths.matcher(path) .matches()) { process(analyzer, path, resource); } } return false; }
public void verifyBundleClasspath() { Parameters bcp = main.getBundleClassPath(); if (bcp.isEmpty() || bcp.containsKey(".")) return; for (String path : bcp.keySet()) { if (path.endsWith("/")) error("A " + Constants.BUNDLE_CLASSPATH + " entry must not end with '/': %s", path); if (dot.getDirectories().containsKey(path)) // We assume that any classes are in a directory // and therefore do not care when the bundle is included return; } for (String path : dot.getResources().keySet()) { if (path.endsWith(".class")) { warning("The " + Constants.BUNDLE_CLASSPATH + " does not contain the actual bundle JAR (as specified with '.' in the " + Constants.BUNDLE_CLASSPATH + ") but the JAR does contain classes. Is this intentional?"); return; } } }
public void verifyBundleClasspath() { Parameters bcp = main.getBundleClassPath(); if (bcp.isEmpty() || bcp.containsKey(".")) return; for (String path : bcp.keySet()) { if (path.endsWith("/")) error("A Bundle-ClassPath entry must not end with '/': %s", path); if (dot.getDirectories().containsKey(path)) // We assume that any classes are in a directory // and therefore do not care when the bundle is included return; } for (String path : dot.getResources().keySet()) { if (path.endsWith(".class")) { warning("The Bundle-Classpath does not contain the actual bundle JAR (as specified with '.' in the Bundle-Classpath) but the JAR does contain classes. Is this intentional?"); return; } } }
public void verifyBundleClasspath() { Parameters bcp = main.getBundleClassPath(); if (bcp.isEmpty() || bcp.containsKey(".")) return; for (String path : bcp.keySet()) { if (path.endsWith("/")) error("A " + Constants.BUNDLE_CLASSPATH + " entry must not end with '/': %s", path); if (dot.getDirectories() .containsKey(path)) // We assume that any classes are in a directory // and therefore do not care when the bundle is included return; } for (String path : dot.getResources() .keySet()) { if (path.endsWith(".class")) { warning("The " + Constants.BUNDLE_CLASSPATH + " does not contain the actual bundle JAR (as specified with '.' in the " + Constants.BUNDLE_CLASSPATH + ") but the JAR does contain classes. Is this intentional?"); return; } } }
public void verifyBundleClasspath() { Parameters bcp = main.getBundleClassPath(); if (bcp.isEmpty() || bcp.containsKey(".")) return; for (String path : bcp.keySet()) { if (path.endsWith("/")) error("A " + Constants.BUNDLE_CLASSPATH + " entry must not end with '/': %s", path); if (dot.getDirectories().containsKey(path)) // We assume that any classes are in a directory // and therefore do not care when the bundle is included return; } for (String path : dot.getResources().keySet()) { if (path.endsWith(".class")) { warning("The " + Constants.BUNDLE_CLASSPATH + " does not contain the actual bundle JAR (as specified with '.' in the " + Constants.BUNDLE_CLASSPATH + ") but the JAR does contain classes. Is this intentional?"); return; } } }