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

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

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

Builder.doIncludeResource介绍

[英]Parse the Bundle-Includes header. Files in the bundles Include header are included in the jar. The source can be a directory or a file.
[中]解析Bundle Includes头。bundle Include头中的文件包含在jar中。源可以是目录或文件。

代码示例

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

private void doIncludeResource(Jar jar, Parameters clauses) throws ZipException, IOException, Exception {
  for (Entry<String,Attrs> entry : clauses.entrySet()) {
    doIncludeResource(jar, entry.getKey(), entry.getValue());
  }
}

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

private void doIncludeResource(Jar jar, String includes) throws Exception {
  Parameters clauses = parseHeader(includes);
  doIncludeResource(jar, clauses);
}

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

private void doIncludeResource(Jar jar, Parameters clauses) throws ZipException, IOException, Exception {
  for (Entry<String,Attrs> entry : clauses.entrySet()) {
    doIncludeResource(jar, entry.getKey(), entry.getValue());
  }
}

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

private void doIncludeResource(Jar jar, String includes) throws Exception {
  Parameters clauses = parseHeader(includes);
  doIncludeResource(jar, clauses);
}

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

private void doIncludeResource(Jar jar, Parameters clauses) throws ZipException, IOException, Exception {
  for (Entry<String,Attrs> entry : clauses.entrySet()) {
    doIncludeResource(jar, entry.getKey(), entry.getValue());
  }
}

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

private void doIncludeResource(Jar jar, String includes) throws Exception {
  Parameters clauses = parseHeader(includes);
  doIncludeResource(jar, clauses);
}

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

private void doIncludeResource(Jar jar, String includes) throws Exception {
  Parameters clauses = parseHeader(includes);
  doIncludeResource(jar, clauses);
}

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

private void doIncludeResource(Jar jar, String includes) throws Exception {
  Parameters clauses = parseHeader(includes);
  doIncludeResource(jar, clauses);
}

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

private void doIncludeResource(Jar jar, Parameters clauses) throws ZipException, IOException, Exception {
  for (Entry<String, Attrs> entry : clauses.entrySet()) {
    String key = removeDuplicateMarker(entry.getKey());
    doIncludeResource(jar, key, entry.getValue());
  }
}

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

private void doIncludeResource(Jar jar, Parameters clauses) throws ZipException, IOException, Exception {
  for (Entry<String, Attrs> entry : clauses.entrySet()) {
    String key = removeDuplicateMarker(entry.getKey());
    doIncludeResource(jar, key, entry.getValue());
  }
}

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

/**
 * Parse the Bundle-Includes header. Files in the bundles Include header are
 * included in the jar. The source can be a directory or a file.
 * 
 * @throws IOException
 * @throws FileNotFoundException
 */
private void doIncludeResources(Jar jar) throws Exception {
  String includes = getProperty("Bundle-Includes");
  if (includes == null) {
    includes = mergeProperties(INCLUDERESOURCE);
    if (includes == null || includes.length() == 0)
      includes = mergeProperties(Constants.INCLUDE_RESOURCE);
  } else
    warning("Please use -includeresource instead of Bundle-Includes");
  doIncludeResource(jar, includes);
}

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

/**
 * Parse the Bundle-Includes header. Files in the bundles Include header are
 * included in the jar. The source can be a directory or a file.
 * 
 * @throws IOException
 * @throws FileNotFoundException
 */
private void doIncludeResources(Jar jar) throws Exception {
  String includes = getProperty("Bundle-Includes");
  if (includes == null) {
    includes = getProperty(INCLUDERESOURCE);
    if (includes == null || includes.length() == 0)
      includes = getProperty("Include-Resource");
  } else
    warning("Please use -includeresource instead of Bundle-Includes");
  doIncludeResource(jar, includes);
}

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

/**
 * Parse the Bundle-Includes header. Files in the bundles Include header are
 * included in the jar. The source can be a directory or a file.
 *
 * @throws IOException
 * @throws FileNotFoundException
 */
private void doIncludeResources(Jar jar) throws Exception {
  String includes = getProperty("Bundle-Includes");
  if (includes == null) {
    includes = getProperty(INCLUDERESOURCE);
    if (includes == null || includes.length() == 0)
      includes = getProperty(Constants.INCLUDE_RESOURCE);
  } else
    warning("Please use -includeresource instead of Bundle-Includes");
  doIncludeResource(jar, includes);
}

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

/**
 * Parse the Bundle-Includes header. Files in the bundles Include header are
 * included in the jar. The source can be a directory or a file.
 * 
 * @throws IOException
 * @throws FileNotFoundException
 */
private void doIncludeResources(Jar jar) throws Exception {
  String includes = getProperty("Bundle-Includes");
  if (includes == null) {
    includes = mergeProperties(INCLUDERESOURCE);
    if (includes == null || includes.length() == 0)
      includes = mergeProperties(Constants.INCLUDE_RESOURCE);
  } else
    warning("Please use -includeresource instead of Bundle-Includes");
  doIncludeResource(jar, includes);
}

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

/**
 * Parse the Bundle-Includes header. Files in the bundles Include header are
 * included in the jar. The source can be a directory or a file.
 *
 * @throws IOException
 * @throws FileNotFoundException
 */
private void doIncludeResources(Jar jar) throws Exception {
  String includes = getProperty("Bundle-Includes");
  if (includes == null) {
    includes = getProperty(INCLUDERESOURCE);
    if (includes == null || includes.length() == 0)
      includes = getProperty(Constants.INCLUDE_RESOURCE);
  } else
    warning("Please use -includeresource instead of Bundle-Includes");
  doIncludeResource(jar, includes);
}

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

/**
 * Turn this normal bundle in a web and add any resources.
 * 
 * @throws Exception
 */
private Jar doWab(Jar dot) throws Exception {
  String wab = getProperty(WAB);
  String wablib = getProperty(WABLIB);
  if (wab == null && wablib == null)
    return dot;
  logger.debug("wab {} {}", wab, wablib);
  setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  Set<String> paths = new HashSet<>(dot.getResources()
    .keySet());
  for (String path : paths) {
    if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
      logger.debug("wab: moving: {}", path);
      dot.rename(path, "WEB-INF/classes/" + path);
    }
  }
  Parameters clauses = parseHeader(getProperty(WABLIB));
  for (Map.Entry<String, Attrs> entry : clauses.entrySet()) {
    File f = getFile(entry.getKey());
    addWabLib(dot, f, entry.getKey(), entry.getValue());
  }
  doIncludeResource(dot, wab);
  return dot;
}

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

/**
 * Turn this normal bundle in a web and add any resources.
 * 
 * @throws Exception
 */
private Jar doWab(Jar dot) throws Exception {
  String wab = getProperty(WAB);
  String wablib = getProperty(WABLIB);
  if (wab == null && wablib == null)
    return dot;
  logger.debug("wab {} {}", wab, wablib);
  setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  Set<String> paths = new HashSet<>(dot.getResources()
    .keySet());
  for (String path : paths) {
    if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
      logger.debug("wab: moving: {}", path);
      dot.rename(path, "WEB-INF/classes/" + path);
    }
  }
  Parameters clauses = parseHeader(getProperty(WABLIB));
  for (Map.Entry<String, Attrs> entry : clauses.entrySet()) {
    File f = getFile(entry.getKey());
    addWabLib(dot, f, entry.getKey(), entry.getValue());
  }
  doIncludeResource(dot, wab);
  return dot;
}

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

/**
 * Turn this normal bundle in a web and add any resources.
 * 
 * @throws Exception
 */
private Jar doWab(Jar dot) throws Exception {
  String wab = getProperty(WAB);
  String wablib = getProperty(WABLIB);
  if (wab == null && wablib == null)
    return dot;
  trace("wab %s %s", wab, wablib);
  setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  Set<String> paths = new HashSet<String>(dot.getResources().keySet());
  for (String path : paths) {
    if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
      trace("wab: moving: %s", path);
      dot.rename(path, "WEB-INF/classes/" + path);
    }
  }
  Parameters clauses = parseHeader(getProperty(WABLIB));
  for (String key : clauses.keySet()) {
    File f = getFile(key);
    addWabLib(dot, f);
  }
  doIncludeResource(dot, wab);
  return dot;
}

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

/**
 * Turn this normal bundle in a web and add any resources.
 *
 * @throws Exception
 */
private Jar doWab(Jar dot) throws Exception {
  String wab = getProperty(WAB);
  String wablib = getProperty(WABLIB);
  if (wab == null && wablib == null)
    return dot;
  trace("wab %s %s", wab, wablib);
  setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  Set<String> paths = new HashSet<String>(dot.getResources().keySet());
  for (String path : paths) {
    if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
      trace("wab: moving: %s", path);
      dot.rename(path, "WEB-INF/classes/" + path);
    }
  }
  Parameters clauses = parseHeader(getProperty(WABLIB));
  for (String key : clauses.keySet()) {
    File f = getFile(key);
    addWabLib(dot, f);
  }
  doIncludeResource(dot, wab);
  return dot;
}

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

/**
 * Turn this normal bundle in a web and add any resources.
 *
 * @throws Exception
 */
private Jar doWab(Jar dot) throws Exception {
  String wab = getProperty(WAB);
  String wablib = getProperty(WABLIB);
  if (wab == null && wablib == null)
    return dot;
  trace("wab %s %s", wab, wablib);
  setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  Set<String> paths = new HashSet<String>(dot.getResources().keySet());
  for (String path : paths) {
    if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
      trace("wab: moving: %s", path);
      dot.rename(path, "WEB-INF/classes/" + path);
    }
  }
  Parameters clauses = parseHeader(getProperty(WABLIB));
  for (String key : clauses.keySet()) {
    File f = getFile(key);
    addWabLib(dot, f);
  }
  doIncludeResource(dot, wab);
  return dot;
}

相关文章

Builder类方法