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

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

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

Builder.build介绍

[英]Build Multiple jars. If the -sub command is set, we filter the file with the given patterns.
[中]构建多个jar。如果设置了-sub命令,我们将使用给定的模式过滤文件。

代码示例

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

/**
 * Create a report of the settings
 * @throws Exception
 */
public void report(Map<String,Object> table) throws Exception {
  build();
  super.report(table);
  table.put("Do Not Copy", getDoNotCopy());
  table.put("Git head", _githead( new String[]{"githead"}));
}

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

/**
 * Create a report of the settings
 * @throws Exception
 */
public void report(Map<String,Object> table) throws Exception {
  build();
  super.report(table);
  table.put("Do Not Copy", getDoNotCopy());
  table.put("Git head", _githead( new String[]{"githead"}));
}

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

/**
 * Create a report of the settings
 * 
 * @throws Exception
 */
@Override
public void report(Map<String, Object> table) throws Exception {
  build();
  super.report(table);
  table.put("Do Not Copy", getDoNotCopy());
  table.put("Git head", _githead(new String[] {
    "githead"
  }));
}

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

/**
 * Create a report of the settings
 * 
 * @throws Exception
 */
@Override
public void report(Map<String, Object> table) throws Exception {
  build();
  super.report(table);
  table.put("Do Not Copy", getDoNotCopy());
  table.put("Git head", _githead(new String[] {
    "githead"
  }));
}

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

protected Builder buildOSGiBundle( MavenProject currentProject, DependencyNode dependencyGraph, Map<String, String> originalInstructions, Properties properties,
  Jar[] classpath ) throws Exception
{
  Builder builder = getOSGiBuilder( currentProject, originalInstructions, properties, classpath );
  addMavenInstructions( currentProject, dependencyGraph, builder );
  builder.build();
  mergeMavenManifest(currentProject, dependencyGraph, builder);
  return builder;
}

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

File file = project.getOutputFile(bsn, version.toString());
if (!file.exists()) {
  try (Builder builder = project.getSubBuilder(bsn); Jar jar = builder.build()) {
    if (jar == null) {
      project.getInfo(builder);

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

if (!file.exists()) {
  Builder builder = project.getSubBuilder(bsn);
  Jar jar = builder.build();
  if (jar == null) {
    project.getInfo(builder);

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

File file = project.getOutputFile(bsn);
if (!file.exists()) {
  Jar jar = builder.build();
  if (jar == null) {
    project.getInfo(builder);

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

/**
 * Do a baseline for this project
 *
 * @throws Exception
 */
public void baseline() throws Exception {
  try (ProjectBuilder pb = getBuilder(null)) {
    for (Builder b : pb.getSubBuilders()) {
      @SuppressWarnings("resource")
      Jar build = b.build();
      getInfo(b);
    }
    getInfo(pb);
  }
}

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

/**
 * Do a baseline for this project
 *
 * @throws Exception
 */
public void baseline() throws Exception {
  try (ProjectBuilder pb = getBuilder(null)) {
    for (Builder b : pb.getSubBuilders()) {
      @SuppressWarnings("resource")
      Jar build = b.build();
      getInfo(b);
    }
    getInfo(pb);
  }
}

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

b.setProperty(Constants.EXPORT_PACKAGE, "*");
  b.setProperty(Constants.IMPORT_PACKAGE, "*;resolution:=optional");
  jar = b.build();
} else if (manifest.getMainAttributes()
  .getValue(Constants.BUNDLE_MANIFESTVERSION) == null) {
  jar = b.build();

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

b.setProperty(Constants.EXPORT_PACKAGE, "*");
  b.setProperty(Constants.IMPORT_PACKAGE, "*;resolution:=optional");
  jar = b.build();
} else if (manifest.getMainAttributes()
  .getValue(Constants.BUNDLE_MANIFESTVERSION) == null) {
  jar = b.build();

代码示例来源: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/biz.aQute.bndlib

bchild.setProperties(bndfile, builder.getBase());
Jar jar = bchild.build();
Jar dot = builder.getJar();

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

bchild.setProperties(bndfile, builder.getBase());
Jar jar = bchild.build();
Jar dot = builder.getTarget();

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

bchild.setProperties(bndfile, builder.getBase());
Jar jar = bchild.build();
Jar dot = builder.getTarget();

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

bchild.setProperties(bndfile, builder.getBase());
Jar jar = bchild.build();
Jar dot = builder.getJar();

代码示例来源: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: biz.aQute.bnd/bnd

public void build(String dest, boolean force, String path) throws IOException, Exception {
  Builder b = new Builder();
  try {
    File f = getFile(path);
    if (!f.isFile()) {
      error("No such file %s", f);
      return;
    }
    b.setTrace(isTrace());
    b.setPedantic(isPedantic());
    b.setProperties(f);
    List<Builder> subs = b.getSubBuilders();
    for (Builder bb : subs) {
      trace("building %s", bb.getPropertiesFile());
      bb.build();
      File out = bb.getOutputFile(dest);
      getInfo(bb, bb.getBsn() + ": ");
      if (isOk()) {
        bb.save(out, force);
      }
      getInfo(bb, bb.getBsn() + ": "); // pickup any save errors
      if (!isOk()) {
        out.delete();
      }
    }
  }
  finally {
    b.close();
  }
}

相关文章

Builder类方法