本文整理了Java中aQute.bnd.osgi.Analyzer.setProperties()
方法的一些代码示例,展示了Analyzer.setProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.setProperties()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Analyzer
类名称:Analyzer
方法名:setProperties
暂无
代码示例来源:origin: reficio/p2-maven-plugin
private static void setInstructions(Analyzer analyzer, ArtifactBundlerInstructions instructions) {
if (!instructions.getInstructions().isEmpty()) {
analyzer.setProperties(BundleUtils.transformDirectivesToProperties(instructions.getInstructions()));
}
}
代码示例来源:origin: biz.aQute/bndlib
/**
* 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();
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
/**
* 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;
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
/**
* 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;
}
}
代码示例来源:origin: biz.aQute.bnd/bndlib
/**
* 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();
}
}
代码示例来源:origin: biz.aQute.bnd/bnd
/**
* 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();
}
}
代码示例来源:origin: org.ops4j.pax.swissbox/pax-swissbox-bnd
analyzer.setProperties( properties );
if( manifest != null && OverwriteMode.MERGE == overwriteMode )
代码示例来源:origin: biz.aQute.bnd/bnd
wrapper.setProperties(properties);
代码示例来源:origin: org.arquillian.liferay/arquillian-deployment-generator-bnd
analyzer.setProperties(analyzerProperties);
代码示例来源:origin: biz.aQute.bnd/bnd
wrapper.setProperties(p);
else {
error("No valid property file: %s", p);
内容来源于网络,如有侵权,请联系作者删除!