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

x33g5p2x  于2022-01-22 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(92)

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

Jar.writeFolder介绍

暂无

代码示例

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

/**
 * Expand the JAR file to a directory.
 * 
 * @param dir the dst directory, is not required to exist
 * @throws Exception if anything does not work as expected.
 */
public void expand(File dir) throws Exception {
  writeFolder(dir);
}

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

/**
 * Expand the JAR file to a directory.
 * 
 * @param dir the dst directory, is not required to exist
 * @throws Exception if anything does not work as expected.
 */
public void expand(File dir) throws Exception {
  writeFolder(dir);
}

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

/**
 * @since 2.4
 */
public void exportRunbundles(String runFilePath, File outputDir) throws Exception {
  Map<String, String> options = Collections.emptyMap();
  Entry<String, Resource> export;
  if (runFilePath == null || runFilePath.length() == 0 || ".".equals(runFilePath)) {
    clear();
    export = export(RunbundlesExporter.RUNBUNDLES, options);
  } else {
    File runFile = IO.getFile(getBase(), runFilePath);
    if (!runFile.isFile())
      throw new IOException(
        String.format("Run file %s does not exist (or is not a file).", IO.absolutePath(runFile)));
    try (Run run = new Run(getWorkspace(), getBase(), runFile)) {
      export = run.export(RunbundlesExporter.RUNBUNDLES, options);
      getInfo(run);
    }
  }
  if (export != null) {
    try (JarResource r = (JarResource) export.getValue()) {
      r.getJar()
        .writeFolder(outputDir);
    }
  }
}

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

/**
 * @since 2.4
 */
public void exportRunbundles(String runFilePath, File outputDir) throws Exception {
  Map<String, String> options = Collections.emptyMap();
  Entry<String, Resource> export;
  if (runFilePath == null || runFilePath.length() == 0 || ".".equals(runFilePath)) {
    clear();
    export = export(RunbundlesExporter.RUNBUNDLES, options);
  } else {
    File runFile = IO.getFile(getBase(), runFilePath);
    if (!runFile.isFile())
      throw new IOException(
        String.format("Run file %s does not exist (or is not a file).", IO.absolutePath(runFile)));
    try (Run run = new Run(getWorkspace(), getBase(), runFile)) {
      export = run.export(RunbundlesExporter.RUNBUNDLES, options);
      getInfo(run);
    }
  }
  if (export != null) {
    try (JarResource r = (JarResource) export.getValue()) {
      r.getJar()
        .writeFolder(outputDir);
    }
  }
}

相关文章

微信公众号

最新文章

更多