aQute.bnd.osgi.Analyzer.setProperties()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中aQute.bnd.osgi.Analyzer.setProperties()方法的一些代码示例,展示了Analyzer.setProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.setProperties()方法的具体详情如下:
包路径:aQute.bnd.osgi.Analyzer
类名称:Analyzer
方法名:setProperties

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);

相关文章

Analyzer类方法