/** * Specifically for Maven * * @param properties * the properties */ public static Properties getManifest(File dirOrJar) throws Exception { Analyzer analyzer = new Analyzer(); try { analyzer.setJar(dirOrJar); Properties properties = new Properties(); properties.put(IMPORT_PACKAGE, "*"); properties.put(EXPORT_PACKAGE, "*"); analyzer.setProperties(properties); Manifest m = analyzer.calcManifest(); Properties result = new Properties(); for (Iterator<Object> i = m.getMainAttributes().keySet().iterator(); i.hasNext();) { Attributes.Name name = (Attributes.Name) i.next(); result.put(name.toString(), m.getMainAttributes().getValue(name)); } return result; } finally { analyzer.close(); } }
/** * Specifically for Maven */ public static Properties getManifest(File dirOrJar) throws Exception { try (Analyzer analyzer = new Analyzer()) { analyzer.setJar(dirOrJar); Properties properties = new UTF8Properties(); properties.put(IMPORT_PACKAGE, "*"); properties.put(EXPORT_PACKAGE, "*"); analyzer.setProperties(properties); Manifest m = analyzer.calcManifest(); Properties result = new UTF8Properties(); for (Iterator<Object> i = m.getMainAttributes() .keySet() .iterator(); i.hasNext();) { Attributes.Name name = (Attributes.Name) i.next(); result.put(name.toString(), m.getMainAttributes() .getValue(name)); } return result; } }
/** * Specifically for Maven */ public static Properties getManifest(File dirOrJar) throws Exception { try (Analyzer analyzer = new Analyzer()) { analyzer.setJar(dirOrJar); Properties properties = new UTF8Properties(); properties.put(IMPORT_PACKAGE, "*"); properties.put(EXPORT_PACKAGE, "*"); analyzer.setProperties(properties); Manifest m = analyzer.calcManifest(); Properties result = new UTF8Properties(); for (Iterator<Object> i = m.getMainAttributes() .keySet() .iterator(); i.hasNext();) { Attributes.Name name = (Attributes.Name) i.next(); result.put(name.toString(), m.getMainAttributes() .getValue(name)); } return result; } }
/** * Specifically for Maven * * @param properties * the properties */ public static Properties getManifest(File dirOrJar) throws Exception { Analyzer analyzer = new Analyzer(); try { analyzer.setJar(dirOrJar); Properties properties = new UTF8Properties(); properties.put(IMPORT_PACKAGE, "*"); properties.put(EXPORT_PACKAGE, "*"); analyzer.setProperties(properties); Manifest m = analyzer.calcManifest(); Properties result = new UTF8Properties(); for (Iterator<Object> i = m.getMainAttributes().keySet().iterator(); i.hasNext();) { Attributes.Name name = (Attributes.Name) i.next(); result.put(name.toString(), m.getMainAttributes().getValue(name)); } return result; } finally { analyzer.close(); } }
/** * Specifically for Maven * * @param properties * the properties */ public static Properties getManifest(File dirOrJar) throws Exception { Analyzer analyzer = new Analyzer(); try { analyzer.setJar(dirOrJar); Properties properties = new UTF8Properties(); properties.put(IMPORT_PACKAGE, "*"); properties.put(EXPORT_PACKAGE, "*"); analyzer.setProperties(properties); Manifest m = analyzer.calcManifest(); Properties result = new UTF8Properties(); for (Iterator<Object> i = m.getMainAttributes().keySet().iterator(); i.hasNext();) { Attributes.Name name = (Attributes.Name) i.next(); result.put(name.toString(), m.getMainAttributes().getValue(name)); } return result; } finally { analyzer.close(); } }
private void populateJar(Analyzer analyzer, File outputFile) throws Exception { Jar jar = analyzer.getJar(); jar.setManifest(analyzer.calcManifest()); try { jar.write(outputFile); } finally { jar.close(); } }
public Verifier(Jar jar) throws Exception { this.analyzer = new Analyzer(this); this.analyzer.use(this); addClose(analyzer); this.analyzer.setJar(jar); this.manifest = this.analyzer.calcManifest(); this.main = Domain.domain(manifest); this.dot = jar; getInfo(analyzer); }
public Verifier(Jar jar) throws Exception { this.analyzer = new Analyzer(this); this.analyzer.use(this); addClose(analyzer); this.analyzer.setJar(jar); this.manifest = this.analyzer.calcManifest(); this.main = Domain.domain(manifest); this.dot = jar; getInfo(analyzer); }
public Verifier(Jar jar) throws Exception { this.analyzer = new Analyzer(this); this.analyzer.use(this); addClose(analyzer); this.analyzer.setJar(jar); this.manifest = this.analyzer.calcManifest(); this.main = Domain.domain(manifest); this.dot = jar; getInfo(analyzer); }
public Verifier(Jar jar) throws Exception { this.analyzer = new Analyzer(this); this.analyzer.use(this); addClose(analyzer); this.analyzer.setJar(jar); this.manifest = this.analyzer.calcManifest(); this.main = Domain.domain(manifest); this.dot = jar; getInfo(analyzer); }
destination; Manifest manifest = analyzer.calcManifest();
public Verifier(Jar jar) throws Exception { this.analyzer = new Analyzer(this); this.analyzer.use(this); addClose(analyzer); this.analyzer.setJar(jar); this.manifest = this.analyzer.calcManifest(); this.main = Domain.domain(manifest); this.dot = jar; getInfo(analyzer); }
a.removeClose(bin_test); a.calcManifest(); StringBuilder extra = new StringBuilder(); String del = "";
a.removeClose(bin_test); a.calcManifest(); StringBuilder extra = new StringBuilder(); String del = "";
try Manifest newManifest = analyzer.calcManifest(); jar.setManifest( newManifest );
Manifest manifest = wrapper.calcManifest(); if (wrapper.isOk()) { wrapper.getJar().setManifest(manifest);
Manifest manifest = analyzer.calcManifest();
wrapper.setBundleVersion(options.version()); Manifest m = wrapper.calcManifest();
final Manifest manifest = osgiAnalyzer.calcManifest();
w.use(this); w.setDefaults(options.bsn(), options.version()); w.calcManifest(); getInfo(w); w.setJar((Jar) null);