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

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

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

Jar.copy介绍

暂无

代码示例

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

  1. /**
  2. * Cop
  3. *
  4. * @param dest
  5. * @param srce
  6. * @param path
  7. * @param overwriteResource
  8. */
  9. private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  10. logger.debug("copy d={} s={} p={}", dest, srce, path);
  11. dest.copy(srce, path, overwrite);
  12. if (hasSources())
  13. dest.copy(srce, "OSGI-OPT/src/" + path, overwrite);
  14. // bnd.info sources must be preprocessed
  15. String bndInfoPath = path + "/bnd.info";
  16. Resource r = dest.getResource(bndInfoPath);
  17. if (r != null && !(r instanceof PreprocessResource)) {
  18. logger.debug("preprocessing bnd.info");
  19. PreprocessResource pp = new PreprocessResource(this, r);
  20. dest.putResource(bndInfoPath, pp);
  21. }
  22. if (hasSources()) {
  23. String srcPath = "OSGI-OPT/src/" + path;
  24. Map<String, Resource> srcContents = srce.getDirectories()
  25. .get(srcPath);
  26. if (srcContents != null) {
  27. dest.addDirectory(srcContents, overwrite);
  28. }
  29. }
  30. }

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

  1. /**
  2. * Cop
  3. *
  4. * @param dest
  5. * @param srce
  6. * @param path
  7. * @param overwriteResource
  8. */
  9. private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  10. logger.debug("copy d={} s={} p={}", dest, srce, path);
  11. dest.copy(srce, path, overwrite);
  12. if (hasSources())
  13. dest.copy(srce, "OSGI-OPT/src/" + path, overwrite);
  14. // bnd.info sources must be preprocessed
  15. String bndInfoPath = path + "/bnd.info";
  16. Resource r = dest.getResource(bndInfoPath);
  17. if (r != null && !(r instanceof PreprocessResource)) {
  18. logger.debug("preprocessing bnd.info");
  19. PreprocessResource pp = new PreprocessResource(this, r);
  20. dest.putResource(bndInfoPath, pp);
  21. }
  22. if (hasSources()) {
  23. String srcPath = "OSGI-OPT/src/" + path;
  24. Map<String, Resource> srcContents = srce.getDirectories()
  25. .get(srcPath);
  26. if (srcContents != null) {
  27. dest.addDirectory(srcContents, overwrite);
  28. }
  29. }
  30. }

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

  1. /**
  2. * Cop
  3. *
  4. * @param dest
  5. * @param srce
  6. * @param path
  7. * @param overwriteResource
  8. */
  9. private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  10. trace("copy d=" + dest + " s=" + srce +" p="+ path);
  11. dest.copy(srce, path, overwrite);
  12. // bnd.info sources must be preprocessed
  13. String bndInfoPath = path + "/bnd.info";
  14. Resource r = dest.getResource(bndInfoPath);
  15. if ( r != null && !(r instanceof PreprocessResource)) {
  16. trace("preprocessing bnd.info");
  17. PreprocessResource pp = new PreprocessResource(this, r);
  18. dest.putResource(bndInfoPath, pp);
  19. }
  20. if (hasSources()) {
  21. String srcPath = "OSGI-OPT/src/" + path;
  22. Map<String,Resource> srcContents = srce.getDirectories().get(srcPath);
  23. if (srcContents != null) {
  24. dest.addDirectory(srcContents, overwrite);
  25. }
  26. }
  27. }

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

  1. /**
  2. * Cop
  3. *
  4. * @param dest
  5. * @param srce
  6. * @param path
  7. * @param overwriteResource
  8. */
  9. private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  10. trace("copy d=" + dest + " s=" + srce + " p=" + path);
  11. dest.copy(srce, path, overwrite);
  12. // bnd.info sources must be preprocessed
  13. String bndInfoPath = path + "/bnd.info";
  14. Resource r = dest.getResource(bndInfoPath);
  15. if (r != null && !(r instanceof PreprocessResource)) {
  16. trace("preprocessing bnd.info");
  17. PreprocessResource pp = new PreprocessResource(this, r);
  18. dest.putResource(bndInfoPath, pp);
  19. }
  20. if (hasSources()) {
  21. String srcPath = "OSGI-OPT/src/" + path;
  22. Map<String,Resource> srcContents = srce.getDirectories().get(srcPath);
  23. if (srcContents != null) {
  24. dest.addDirectory(srcContents, overwrite);
  25. }
  26. }
  27. }

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

  1. /**
  2. * Cop
  3. *
  4. * @param dest
  5. * @param srce
  6. * @param path
  7. * @param overwriteResource
  8. */
  9. private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  10. trace("copy d=" + dest + " s=" + srce + " p=" + path);
  11. dest.copy(srce, path, overwrite);
  12. // bnd.info sources must be preprocessed
  13. String bndInfoPath = path + "/bnd.info";
  14. Resource r = dest.getResource(bndInfoPath);
  15. if (r != null && !(r instanceof PreprocessResource)) {
  16. trace("preprocessing bnd.info");
  17. PreprocessResource pp = new PreprocessResource(this, r);
  18. dest.putResource(bndInfoPath, pp);
  19. }
  20. if (hasSources()) {
  21. String srcPath = "OSGI-OPT/src/" + path;
  22. Map<String,Resource> srcContents = srce.getDirectories().get(srcPath);
  23. if (srcContents != null) {
  24. dest.addDirectory(srcContents, overwrite);
  25. }
  26. }
  27. }

相关文章