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

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

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

Jar.rename介绍

暂无

代码示例

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

  1. /**
  2. * Turn this normal bundle in a web and add any resources.
  3. *
  4. * @throws Exception
  5. */
  6. private Jar doWab(Jar dot) throws Exception {
  7. String wab = getProperty(WAB);
  8. String wablib = getProperty(WABLIB);
  9. if (wab == null && wablib == null)
  10. return dot;
  11. logger.debug("wab {} {}", wab, wablib);
  12. setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  13. Set<String> paths = new HashSet<>(dot.getResources()
  14. .keySet());
  15. for (String path : paths) {
  16. if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
  17. logger.debug("wab: moving: {}", path);
  18. dot.rename(path, "WEB-INF/classes/" + path);
  19. }
  20. }
  21. Parameters clauses = parseHeader(getProperty(WABLIB));
  22. for (Map.Entry<String, Attrs> entry : clauses.entrySet()) {
  23. File f = getFile(entry.getKey());
  24. addWabLib(dot, f, entry.getKey(), entry.getValue());
  25. }
  26. doIncludeResource(dot, wab);
  27. return dot;
  28. }

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

  1. /**
  2. * Turn this normal bundle in a web and add any resources.
  3. *
  4. * @throws Exception
  5. */
  6. private Jar doWab(Jar dot) throws Exception {
  7. String wab = getProperty(WAB);
  8. String wablib = getProperty(WABLIB);
  9. if (wab == null && wablib == null)
  10. return dot;
  11. logger.debug("wab {} {}", wab, wablib);
  12. setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  13. Set<String> paths = new HashSet<>(dot.getResources()
  14. .keySet());
  15. for (String path : paths) {
  16. if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
  17. logger.debug("wab: moving: {}", path);
  18. dot.rename(path, "WEB-INF/classes/" + path);
  19. }
  20. }
  21. Parameters clauses = parseHeader(getProperty(WABLIB));
  22. for (Map.Entry<String, Attrs> entry : clauses.entrySet()) {
  23. File f = getFile(entry.getKey());
  24. addWabLib(dot, f, entry.getKey(), entry.getValue());
  25. }
  26. doIncludeResource(dot, wab);
  27. return dot;
  28. }

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

  1. /**
  2. * Turn this normal bundle in a web and add any resources.
  3. *
  4. * @throws Exception
  5. */
  6. private Jar doWab(Jar dot) throws Exception {
  7. String wab = getProperty(WAB);
  8. String wablib = getProperty(WABLIB);
  9. if (wab == null && wablib == null)
  10. return dot;
  11. trace("wab %s %s", wab, wablib);
  12. setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  13. Set<String> paths = new HashSet<String>(dot.getResources().keySet());
  14. for (String path : paths) {
  15. if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
  16. trace("wab: moving: %s", path);
  17. dot.rename(path, "WEB-INF/classes/" + path);
  18. }
  19. }
  20. Parameters clauses = parseHeader(getProperty(WABLIB));
  21. for (String key : clauses.keySet()) {
  22. File f = getFile(key);
  23. addWabLib(dot, f);
  24. }
  25. doIncludeResource(dot, wab);
  26. return dot;
  27. }

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

  1. /**
  2. * Turn this normal bundle in a web and add any resources.
  3. *
  4. * @throws Exception
  5. */
  6. private Jar doWab(Jar dot) throws Exception {
  7. String wab = getProperty(WAB);
  8. String wablib = getProperty(WABLIB);
  9. if (wab == null && wablib == null)
  10. return dot;
  11. trace("wab %s %s", wab, wablib);
  12. setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  13. Set<String> paths = new HashSet<String>(dot.getResources().keySet());
  14. for (String path : paths) {
  15. if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
  16. trace("wab: moving: %s", path);
  17. dot.rename(path, "WEB-INF/classes/" + path);
  18. }
  19. }
  20. Parameters clauses = parseHeader(getProperty(WABLIB));
  21. for (String key : clauses.keySet()) {
  22. File f = getFile(key);
  23. addWabLib(dot, f);
  24. }
  25. doIncludeResource(dot, wab);
  26. return dot;
  27. }

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

  1. /**
  2. * Turn this normal bundle in a web and add any resources.
  3. *
  4. * @throws Exception
  5. */
  6. private Jar doWab(Jar dot) throws Exception {
  7. String wab = getProperty(WAB);
  8. String wablib = getProperty(WABLIB);
  9. if (wab == null && wablib == null)
  10. return dot;
  11. trace("wab %s %s", wab, wablib);
  12. setBundleClasspath(append("WEB-INF/classes", getProperty(BUNDLE_CLASSPATH)));
  13. Set<String> paths = new HashSet<String>(dot.getResources().keySet());
  14. for (String path : paths) {
  15. if (path.indexOf('/') > 0 && !Character.isUpperCase(path.charAt(0))) {
  16. trace("wab: moving: %s", path);
  17. dot.rename(path, "WEB-INF/classes/" + path);
  18. }
  19. }
  20. Parameters clauses = parseHeader(getProperty(WABLIB));
  21. for (String key : clauses.keySet()) {
  22. File f = getFile(key);
  23. addWabLib(dot, f);
  24. }
  25. doIncludeResource(dot, wab);
  26. return dot;
  27. }

相关文章