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

x33g5p2x  于2022-01-17 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(176)

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

Builder.mergeManifest介绍

暂无

代码示例

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

b.addClasspath(jar);
b.setProperty(Constants.PRIVATE_PACKAGE, "*");
b.mergeManifest(manifest);
String imprts = manifest.getMainAttributes()
  .getValue(Constants.IMPORT_PACKAGE);

代码示例来源:origin: org.apache.felix/maven-bundle-plugin

analyzer.mergeManifest( analyzer.getJar().getManifest() );
analyzer.getJar().setManifest( analyzer.calcManifest() );

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

b.addClasspath(jar);
b.setProperty(Constants.PRIVATE_PACKAGE, "*");
b.mergeManifest(manifest);
String imprts = manifest.getMainAttributes()
  .getValue(Constants.IMPORT_PACKAGE);

代码示例来源:origin: biz.aQute/bndlib

public Jar getValidJar(Jar jar, String id) throws Exception {
  Manifest manifest = jar.getManifest();
  if (manifest == null) {
    trace("Wrapping with all defaults");
    Builder b = new Builder(this);
    b.addClasspath(jar);
    b.setProperty("Bnd-Message", "Wrapped from " + id + "because lacked manifest");
    b.setProperty(Constants.EXPORT_PACKAGE, "*");
    b.setProperty(Constants.IMPORT_PACKAGE, "*;resolution:=optional");
    jar = b.build();
  } else if (manifest.getMainAttributes().getValue(Constants.BUNDLE_MANIFESTVERSION) == null) {
    trace("Not a release 4 bundle, wrapping with manifest as source");
    Builder b = new Builder(this);
    b.addClasspath(jar);
    b.setProperty(Constants.PRIVATE_PACKAGE, "*");
    b.mergeManifest(manifest);
    String imprts = manifest.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
    if (imprts == null)
      imprts = "";
    else
      imprts += ",";
    imprts += "*;resolution=optional";
    b.setProperty(Constants.IMPORT_PACKAGE, imprts);
    b.setProperty("Bnd-Message", "Wrapped from " + id + "because had incomplete manifest");
    jar = b.build();
  }
  return jar;
}

代码示例来源:origin: biz.aQute.bnd/bndlib

public Jar getValidJar(Jar jar, String id) throws Exception {
  Manifest manifest = jar.getManifest();
  if (manifest == null) {
    trace("Wrapping with all defaults");
    Builder b = new Builder(this);
    this.addClose(b);
    b.addClasspath(jar);
    b.setProperty("Bnd-Message", "Wrapped from " + id + "because lacked manifest");
    b.setProperty(Constants.EXPORT_PACKAGE, "*");
    b.setProperty(Constants.IMPORT_PACKAGE, "*;resolution:=optional");
    jar = b.build();
  } else if (manifest.getMainAttributes().getValue(Constants.BUNDLE_MANIFESTVERSION) == null) {
    trace("Not a release 4 bundle, wrapping with manifest as source");
    Builder b = new Builder(this);
    this.addClose(b);
    b.addClasspath(jar);
    b.setProperty(Constants.PRIVATE_PACKAGE, "*");
    b.mergeManifest(manifest);
    String imprts = manifest.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
    if (imprts == null)
      imprts = "";
    else
      imprts += ",";
    imprts += "*;resolution=optional";
    b.setProperty(Constants.IMPORT_PACKAGE, imprts);
    b.setProperty("Bnd-Message", "Wrapped from " + id + "because had incomplete manifest");
    jar = b.build();
  }
  return jar;
}

代码示例来源:origin: biz.aQute.bnd/bnd

public Jar getValidJar(Jar jar, String id) throws Exception {
  Manifest manifest = jar.getManifest();
  if (manifest == null) {
    trace("Wrapping with all defaults");
    Builder b = new Builder(this);
    this.addClose(b);
    b.addClasspath(jar);
    b.setProperty("Bnd-Message", "Wrapped from " + id + "because lacked manifest");
    b.setProperty(Constants.EXPORT_PACKAGE, "*");
    b.setProperty(Constants.IMPORT_PACKAGE, "*;resolution:=optional");
    jar = b.build();
  } else if (manifest.getMainAttributes().getValue(Constants.BUNDLE_MANIFESTVERSION) == null) {
    trace("Not a release 4 bundle, wrapping with manifest as source");
    Builder b = new Builder(this);
    this.addClose(b);
    b.addClasspath(jar);
    b.setProperty(Constants.PRIVATE_PACKAGE, "*");
    b.mergeManifest(manifest);
    String imprts = manifest.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
    if (imprts == null)
      imprts = "";
    else
      imprts += ",";
    imprts += "*;resolution=optional";
    b.setProperty(Constants.IMPORT_PACKAGE, imprts);
    b.setProperty("Bnd-Message", "Wrapped from " + id + "because had incomplete manifest");
    jar = b.build();
  }
  return jar;
}

代码示例来源:origin: org.ops4j.pax.tinybundles/tinybundles

analyzer.mergeManifest( jar.getManifest() );

相关文章

微信公众号

最新文章

更多

Builder类方法